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

Implementation of AMQP interceptor is passing a null RemotingConnection reference

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • AMQ 7.1.0.GA
    • amqp-protocol, broker-core
    • None
    • Release Notes, User Experience
    • 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.
    • Documented as Resolved Issue
    • 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.
    • AMQ Broker 1833, AMQ Broker 1836

      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"
      

              rh-ee-ataylor Andy Taylor
              rhn-support-zanini Ricardo Zanini
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved:

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