123456789101112131415161718 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace EasyMQ
- {
- public interface ISendReceive
- {
- public Task<T> ReceiveAsync<T>(string queue, string selector = "", CancellationToken token = default);
- public T? Receive<T>(string queue, string selector = "", CancellationToken token = default);
- public void Receive<T>(string queue, Action<T> action, string selector = "");
- public void Receive(string queue, OnMessageHandle onMessage, string selector = "");
- public Task SendAsync<T>(string queue, T value,uint timeToLive =0, Dictionary<string, string>? properties = null);
- public Task SendAsync(string queue, ref byte data, uint datalen, uint timeToLive = 0, Dictionary<string, string>? properties = null);
- }
- }
|