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

Implementation of AMQP interceptor is passing a null RemotingConnection reference

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: AMQ 7.1.0.GA
    • Fix Version/s: None
    • Component/s: amqp-protocol, broker-core
    • Labels:
      None
    • Environment:

      Tested with AMQ 7.1.1 broker

    • Target Release:
    • Sprint:
      AMQ Broker 1833, AMQ Broker 1836
    • Steps to Reproduce:
      Hide

      1. Implement the code mentioned in description
      2. Add the interceptor to the

      {broker.xml}

      3. Observe the console log.

      The properties related to the

      {RemotingConnection}

      shouldn't be null.

      Show
      1. Implement the code mentioned in description 2. Add the interceptor to the {broker.xml} 3. Observe the console log. The properties related to the {RemotingConnection} shouldn't be null.
    • Affects:
      Release Notes, User Experience
    • Release Notes Text:
      Hide
      Previously, if you were using the interceptor API with the AMQP protocol, and you implemented the following method, the connection parameter was always null:

      public boolean intercept(AMQPMessage message, RemotingConnection connection)

      Now, the connection parameter is properly set.
      Show
      Previously, if you were using the interceptor API with the AMQP protocol, and you implemented the following method, the connection parameter was always null: public boolean intercept(AMQPMessage message, RemotingConnection connection) Now, the connection parameter is properly set.
    • Release Notes Docs Status:
      Documented as Resolved Issue

      Description

      Implemeting the class org.apache.activemq.artemis.protocol.amqp.broker.AmqpInterceptor the intercept method receives a null reference to the RemotingConnection.

      The customer needs this information to log the remote address into their logs file. Please, see a reproducer in the link bellow:

      http://pastebin.test.redhat.com/594102

      The outcome of this interceptor is:

      IN:

      2018-05-21 17:55:47,295 INFO  [amq.sample.interceptor.CustomLogInterceptor] Packet: org.apache.activemq.artemis.protocol.amqp.broker.AMQPMessage
      "type":"in", "message-id":"0", "correlation-id":"null", "destination":"Queue::Test", "payload":"Text!", "clientID":"null-client-id", "remoteAddress":"null-remote-address", "protocolName":"null-protocol-name", "amqRouteTo":"null"
      

      OUT:

      2018-05-21 17:58:25,241 INFO  [amq.sample.interceptor.CustomLogInterceptor] Packet: org.apache.activemq.artemis.protocol.amqp.broker.AMQPMessage
      "type":"out", "message-id":"139", "correlation-id":"null", "destination":"Queue::Test", "payload":"Text!", "clientID":"null-client-id", "remoteAddress":"null-remote-address", "protocolName":"null-protocol-name", "amqRouteTo":"null"
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                ataylor Andy Taylor
                Reporter:
                zanini Ricardo Zanini
              • Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 day
                  1d
                  Remaining:
                  Remaining Estimate - 1 day
                  1d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified