public async Task HandleAsync(Message message, CancellationToken token) { var body = JsonConvert.DeserializeObject <T>(Encoding.UTF8.GetString(message.Body)); await messageProcessor.ProcessAsync(body); Console.WriteLine("Message handled successfully!"); }
public async Task Handle(Message message, CancellationToken token) { await messageProcessor.ProcessAsync(message); System.Console.WriteLine("Message handled successfully!"); }