1
0
mirror of synced 2024-11-15 01:33:51 +00:00
PettingZoo/PettingZoo.Core/Connection/ISubscriber.cs

30 lines
680 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
namespace PettingZoo.Core.Connection
{
2022-01-12 19:54:30 +00:00
public interface ISubscriber : IDisposable
{
string? QueueName { get; }
string? Exchange {get; }
string? RoutingKey { get; }
event EventHandler<MessageReceivedEventArgs>? MessageReceived;
IEnumerable<ReceivedMessageInfo> GetInitialMessages();
void Start();
}
public class MessageReceivedEventArgs : EventArgs
{
2021-12-06 13:08:29 +00:00
public ReceivedMessageInfo MessageInfo { get; }
2021-12-06 13:08:29 +00:00
public MessageReceivedEventArgs(ReceivedMessageInfo messageInfo)
{
MessageInfo = messageInfo;
}
}
}