Announcement Announcement Module
Collapse
No announcement yet.
Spring Integration and JMSMessageId Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Integration and JMSMessageId

    Is there any way to get the generated JMSMessageId from the sending Spring Integration gateway/adapter post-send? If important, we're currently using SonicMQ and migrating to ActiveMQ.

    We're trying to log information about each message so we can follow the message as it passes from service to service, in APM lingo a "transaction trace", following this pattern:

    Service A (initiates JMS message) Outbound Request
    received_message_id=NONE messageId=<generated by Service A> ...

    Service B Inbound Request
    received_message_id=<generated by Service A> message_id=NONE_YET ...

    Service B Outbound Reply
    received_message_id=<generated by Service A> message_id=<generated by Service B>...

    Service A Inbound Reply
    received_message_id=<generated by Service B> messageId=<generated by Service A> ...


    While we could set custom headers to do this instead, it would be very helpful if there was some way to get at the generated JMSMessageId, which would allow us to add more trace points in the infrastructure and keep the structure consistent.
    Last edited by cuttcards; Jul 23rd, 2013, 02:46 PM.

  • #2
    This would be difficult in the adapter because it doesn't have access to the Message object. The gateway could log it (and does in some circumstances, but not all).

    Most users would do as you suggest and use a custom header for tracing messages across systems.

    Comment


    • #3
      Thanks, Gary. I appreciate it.

      Comment

      Working...
      X