12345678910111213141516171819 |
- 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<string,object> properties);
- public interface IPubSub
- {
- Task PublishAsync<T>(T message,Dictionary<string,string>? properties =null);
- Task PublishAsync(string topicname,ref byte message, UInt32 byteslength, Dictionary<string, string>? properties = null);
- void Subscribe<T>(Action<T, IPrimitiveMap> onMessage, string selector ="");
- void Subscribe(string topicname, OnMessageHandle onMessage, string selector = "");
- }
- }
|