Results 1 to 3 of 3

Thread: how to add additional headers to outbound jms message

  1. #1
    Join Date
    Feb 2009
    Posts
    16

    Default 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. #2

    Default

    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.

  3. #3
    Join Date
    Feb 2009
    Posts
    16

    Default 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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •