static void SendMessageLargePayload(IBus bus) { #region SendMessageLargePayload MessageWithLargePayload message = new MessageWithLargePayload { SomeProperty = "This message contains a large blob that will be sent on the data bus", LargeBlob = new DataBusProperty<byte[]>(new byte[1024*1024*5]) //5MB }; bus.Send("Samples.DataBus.Receiver",message); #endregion Console.WriteLine("Message sent, the payload is stored in: " + BasePath); }
static async Task SendMessageLargePayload(IEndpointInstance endpointInstance) { #region SendMessageLargePayload MessageWithLargePayload message = new MessageWithLargePayload { SomeProperty = "This message contains a large blob that will be sent on the data bus", LargeBlob = new DataBusProperty<byte[]>(new byte[1024*1024*5]) //5MB }; await endpointInstance.Send("Samples.DataBus.Receiver", message); #endregion Console.WriteLine("Message sent, the payload is stored in: ..\\..\\..\\storage"); }
static void SendMessageLargePayload(IBus bus) { Console.WriteLine("Sending message..."); #region SendMessageLargePayload MessageWithLargePayload message = new MessageWithLargePayload { Description = "This message contains a large payload that will be sent on the Azure data bus", LargePayload = new DataBusProperty<byte[]>(new byte[1024*1024*5]) // 5MB }; bus.Send("Samples.AzureBlobStorageDataBus.Receiver", message); #endregion Console.WriteLine("Message sent."); }
static async Task SendMessageLargePayload(IMessageSession messageSession) { Console.WriteLine("Sending message..."); #region SendMessageLargePayload var message = new MessageWithLargePayload { Description = "This message contains a large payload that will be sent on the Azure data bus", LargePayload = new DataBusProperty <byte[]>(new byte[1024 * 1024 * 5]) // 5MB }; await messageSession.Send("Samples.AzureBlobStorageDataBus.Receiver", message) .ConfigureAwait(false); #endregion Console.WriteLine("Message sent."); }
static async Task SendMessageLargePayload(IMessageSession messageSession) { Console.WriteLine("Sending message..."); #region SendMessageLargePayload var message = new MessageWithLargePayload { Description = "This message contains a large payload that will be sent on the Azure data bus", LargePayload = new DataBusProperty<byte[]>(new byte[1024*1024*5]) // 5MB }; await messageSession.Send("Samples.AzureBlobStorageDataBus.Receiver", message) .ConfigureAwait(false); #endregion Console.WriteLine("Message sent."); }