using Apache.NMS; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace EasyMQ { public delegate void OnMessageHandle(ref byte value, uint byteslength,Dictionary properties); public interface IPubSub { Task PublishAsync(T message,Dictionary? properties =null); Task PublishAsync(string topicname,ref byte message, UInt32 byteslength, Dictionary? properties = null); void Subscribe(Action onMessage, string selector =""); void Subscribe(string topicname, OnMessageHandle onMessage, string selector = ""); } }