2

I use this way to start subscribing to messages:

var client = BusClientFactory.CreateDefault();
client.SubscribeAsync<BasicMessage>(async (msg, context) =>
{
  Console.WriteLine($"Recieved: {msg.Prop}.");
});

... but how do I "unsubscribe" and/or disconnect? I have the code in a windows service and I want to be able to unsubscrite/disconnect when shuting down the Windows Service.

Thomas
  • 469
  • 6
  • 16

0 Answers0