Announcement Announcement Module
No announcement yet.
Filtering on header vs payload Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Filtering on header vs payload

    I"m using spring integration/jms to send a Message.

    The Message contains a Set of String values which is just zero or more user-specified String tags.
    Currently this is in the Message so that on the receiving end, I can use spel to filter based on the existence of one of these tags.

    I tried adding these values to the Header as well, but it appears that a Set<String> is not a valid JMS header type and so it never gets sent along. If I use a String it works fine.

    I'm leaning towards just keeping it in the payload and filtering on the payload.tags field.

    Is there an advantage to using the header vs the payload? I"m not sure of a workaround anyways, but curious to know what the advantages of having it in the header is if I"m just "duplicating it in the header".