Beispiel #1
0
 public async ValueTask Publish(IServiceBusMessage message)
 {
     await _sender.SendMessageAsync(new ServiceBusMessage
     {
         Body = BinaryData.FromStream(message.GetStream())
     });
 }
Beispiel #2
0
        public T Deserialize <T>(IServiceBusMessage message)
        {
            using var stream = message.GetStream();
            using var reader = new StreamReader(stream);
            using var json   = new JsonTextReader(reader);
            var consumerMessage = _serializer.Deserialize <T>(json);

            return(consumerMessage);
        }