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

Broker change message header durable property from false to true

    Details

    • Type: Bug
    • Status: Done
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: A-MQ 7.0.0.ER13
    • Fix Version/s: A-MQ 7.0.0.ER14
    • Component/s: None
    • Labels:
    • Environment:

      client: AMQP client
      broker: AMQ7-ER13 on rhel

    • Target Release:
    • Steps to Reproduce:
      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

      Description

      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();
              }
          }
      }
      

        Gliffy Diagrams

          Attachments

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

            Issue Links

              Activity

                People

                • Assignee:
                  ataylor Andy Taylor
                  Reporter:
                  dkornel David Kornel
                  Tester:
                  David Kornel
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: