Exemplo n.º 1
0
 public Task SendAsync(IOutgoingMessage message, IReceiptBehavior receiptBehavior)
 {
     return
         (receiptBehavior.DecorateSendMessageTask(
              _transport.SendMessage(new OutgoingMessageAdapter(receiptBehavior.DecorateMessage(message),
                                                                _destination))));
 }
Exemplo n.º 2
0
        private static async Task SendMessages(IDestination destination, IReceiptBehavior receiptBehavior, IStompTransaction transaction)
        {
            var bodyOutgoingMessage =
                new BodyOutgoingMessage(File.ReadAllBytes(@"Example.xml")).WithPersistence(); //.WithTransaction(transaction);

            for (int i = 0; i < 10000; i++)
            {
                await destination.SendAsync(bodyOutgoingMessage, receiptBehavior);
            }

            await transaction.Commit();

            Console.WriteLine("Done sending");
        }
Exemplo n.º 3
0
        private static async Task SendMessages(IDestination destination, IReceiptBehavior receiptBehavior, IStompTransaction transaction)
        {
            var bodyOutgoingMessage =
                new BodyOutgoingMessage(File.ReadAllBytes(@"Example.xml")).WithPersistence(); //.WithTransaction(transaction);

            for (int i = 0; i < 10000; i++)
            {

                await destination.SendAsync(bodyOutgoingMessage, receiptBehavior);
            }

            await transaction.Commit();

            Console.WriteLine("Done sending");

        }
Exemplo n.º 4
0
 public Task SendAsync(IOutgoingMessage message, IReceiptBehavior receiptBehavior)
 {
     return(_destination.SendAsync(message, receiptBehavior));
 }