Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-476

Broker change message header durable property from false to true

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • A-MQ 7.0.0.ER14
    • A-MQ 7.0.0.ER13
    • None
    • Hide
      1. Start broker ER13 on windows or linux
      2. Run .net lite client reproducer from attachment on windows machine (ws2012r2, win8, win8.1) and type ReplyTo.exe amqp://<ip-addr-of-broker>:5672 <queue>
      3. check on console output difference between header:durable
      Show
      Start broker ER13 on windows or linux Run .net lite client reproducer from attachment on windows machine (ws2012r2, win8, win8.1) and type ReplyTo.exe amqp://<ip-addr-of-broker>:5672 <queue> check on console output difference between header:durable

      When Receiver receive message with replyTo property and make sender under same connection and session and send same message to replyto queue, broker change Header:Durable property from false to True.
      This is second issue that broker change value of message, please check other properties etc... ENTMQBR-474

      code of reproducer in attachment

      using System;
      using System.Collections.Generic;
      using System.Linq;
      using System.Text;
      using System.Threading.Tasks;
      using Amqp;
      using Amqp.Framing;
      using Amqp.Types;
      
      namespace test
      {
          class ReplyTo
          {
              public static void RunTest(string[] args)
              {
                  string broker = args.Length >= 1 ? args[0] : "amqp://localhost:5672";
                  string queue = args.Length >= 2 ? args[1] : "jms.queue.test";
      
                  Address address = new Address(broker);
                  string replyToQueue = "jms.queue.replyQ";
                  string testName = "Replyto";
                  const int nMsgs = 1;
      
                  Connection connection = new Connection(address);
                  Session session = new Session(connection);
      
                  ////////////////////////////////////////////////////////////////////////////////////////////////////////
                  //send messages and close connection and session
                  SenderLink sender = new SenderLink(session, "sender-" + testName, queue);
      
                  for(int i = 0; i < nMsgs; i++)
                  {
                      Message msg = new Message("tests Reply to");
                      msg.Properties = new Properties();
                      msg.Header = new Header() { Durable = false };
                      msg.Properties.ReplyTo = replyToQueue;
                      sender.Send(msg);
                  }
      
                  sender.Close();
                  session.Close();
                  connection.Close();
                  /////////////////////////////////////////////////////////////////////////////////////////////////////////
                  //receive messages and send to reply to queue
                  connection = new Connection(address);
                  session = new Session(connection);
                  ReceiverLink receiver = new ReceiverLink(session, "receiver-" + testName, queue);
      
                  for (int i = 0; i < nMsgs; ++i)
                  {
                      Message message = receiver.Receive();
                      receiver.Accept(message);
                      Console.WriteLine("Msg from test queue: Durable={0}", message.Header.Durable);
      
                      //send messages on reply queue
                      SenderLink replySender = new SenderLink(session, "replyToSender", message.Properties.ReplyTo);
                      replySender.Send(message);
                      replySender.Close();
                  }
      
                  receiver.Close();
                  session.Close();
                  connection.Close();
                  ////////////////////////////////////////////////////////////////////////////////////////////////////////
                  //receive messages from reply queue
                  connection = new Connection(address);
                  session = new Session(connection);
                  receiver = new ReceiverLink(session, "receiver-" + testName, replyToQueue);
      
                  for (int i = 0; i < nMsgs; ++i)
                  {
                      Message message = receiver.Receive();
                      receiver.Accept(message);
                      Console.WriteLine("Msg from replyQ queue: Durable={0}", message.Header.Durable);
                  }
      
                  receiver.Close();
                  session.Close();
                  connection.Close();
                  ////////////////////////////////////////////////////////////////////////////////////////////////////////
                  Console.ReadLine();
              }
          }
      }
      

        1. ReplyTo.zip
          95 kB
        2. cpp.zip
          189 kB
        3. brkConfig_etc.zip
          5 kB

              rh-ee-ataylor Andy Taylor
              dkornel@redhat.com David Kornel
              David Kornel David Kornel
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: