Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-3817

Marshalled properties don't get updated if modified during preProcessDispatch (TraceBrokerPathPlugin looks broken)

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Patch Available

    Description

      Enabling the TraceBrokerPathPlugin with a custom property name = 'JMSXTrace' sends outdated information to the consumer. When inspecting the property at the consumer code, it has not been updated with the complete broker path. Only the first broker, where the message was produced into, appears. No matter how many brokers are in the route (tested with 4).

      Having dug into the code, it looks like marshalledProperties in Message were already set but not dirtied when setProperty was called again from the TraceBrokerPathPlugin. Also, Message.beforeMarshall() assumes that since marshalledProperties is already set, it doesn't need updating. Therefore, the message is dispatched to the consumer with an old version of the properties.

      I think Message.setProperty() should check whether marshalledProperties already has a value. If it does, it should re-marshall (i.e. dirty the cache).

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            tabish Timothy A. Bish
            raulvk Raúl Kripalani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment