2021-11-28 13:18:21 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace PettingZoo.Core.Connection
|
|
|
|
|
{
|
|
|
|
|
public interface ISubscriber : IAsyncDisposable
|
|
|
|
|
{
|
|
|
|
|
string Exchange {get; }
|
|
|
|
|
string RoutingKey { get; }
|
|
|
|
|
|
|
|
|
|
event EventHandler<MessageReceivedEventArgs>? MessageReceived;
|
|
|
|
|
|
|
|
|
|
void Start();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class MessageReceivedEventArgs : EventArgs
|
|
|
|
|
{
|
2021-12-06 13:08:29 +00:00
|
|
|
|
public ReceivedMessageInfo MessageInfo { get; }
|
2021-11-28 13:18:21 +00:00
|
|
|
|
|
|
|
|
|
|
2021-12-06 13:08:29 +00:00
|
|
|
|
public MessageReceivedEventArgs(ReceivedMessageInfo messageInfo)
|
2021-11-28 13:18:21 +00:00
|
|
|
|
{
|
|
|
|
|
MessageInfo = messageInfo;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|