Esempio n. 1
0
 public static void Publish(this NatsClient nats, string subject, byte[] data)
 => nats.Publish(subject, null, data);
Esempio n. 2
0
 public static ISubscription Subscribe(this NatsClient nats, string subject, string queueGroup, Func <MsgOperation, Task> handler)
 => nats.Subscribe(subject, queueGroup, new TaskMessageSubscription(handler));
Esempio n. 3
0
 public static ISubscription Subscribe(this NatsClient nats, string subject, string queueGroup, Action <MsgOperation> handler)
 => nats.Subscribe(subject, queueGroup, new SyncMessageSubscription(handler));
Esempio n. 4
0
 public static ISubscription Subscribe(this NatsClient nats, string subject, Func <MsgOperation, ValueTask> handler)
 => nats.Subscribe(subject, new ValueTaskMessageSubscription(handler));
Esempio n. 5
0
 public static ISubscription Subscribe(this NatsClient nats, string subject, IMessageSubscription handler)
 => nats.Subscribe(subject, default, handler);
Esempio n. 6
0
 public static void Sub(this NatsClient nats, string subject, string sid, Func <MsgOperation, ValueTask> handler)
 {
     nats.Sub(subject, sid, new DelegateMessageSubscription(handler));
 }