Announcement Announcement Module
Collapse
No announcement yet.
how to add additional headers to outbound jms message Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to add additional headers to outbound jms message

    I have the following scenario:
    1. receive a message on a jms topic
    2. add a custom header
    3. send it out on a different jms topic

    How can I add the customer header. do I need to provide a custom implementation of header-mapper? If so, are there any example implementations I can follow?

  • #2
    The JmsTemplate lets you create a Message, which is what you want to send a message. From there, you can add some of the standardized header fields, or add properties (e.g. setStringProperty) to create something that looks and behaves as a custom header. AFAIK, custom headers would be proprietary extensions to the JMS API.

    Comment


    • #3
      Used header enricher

      Thank you for your response. I was able to use header-enricher to add the custom header. I believe the implementation gets the map of header key value pairs and adds the custom headers to it.

      Comment

      Working...
      X