3

I'm working on building a few JMS triggers in webMethods.

I would like to filter my messages based on certain conditions in the payload of the message which is part of JMS Message body string. As I understand JMS message selector will not do this filtering. I'm trying to see if Xquery is able to do this for me.

Any idea if Xquery can extract the value of a field hidden inside an XML (which is present inside the JMS Message body string)?

rtruszk
  • 3,902
  • 13
  • 36
  • 53

2 Answers2

2

JMS triggers cannot filter on values other than those in the JMS message header.

To achieve what you want you can either:

  1. Extract the value you want to filter on and add it to the JMS message header prior to enqueuing the message, or
  2. Check the JMS message body yourself in your trigger service, and decide whether to process the message or ignore it depending on the result of your check.
Lachlan Dowding
  • 4,356
  • 1
  • 15
  • 18
1

By spec, that's not supported. I suppose some JMS impl might have a proprietary feature like this (ActiveMQ perhaps ?), but you should probably look at implementing a message router like Apache Camel or Spring Integration.

Nicholas
  • 15,916
  • 4
  • 42
  • 66