Using JMS Message Selector
The JMS Send Message activity sends five queue messages and sets an application property with the index. The Get JMS Queue Message activity selects the third message using message selector.
Procedure
Result
The Console displays a message similar to the following:
11:54:01.283 INFO [bwThread:In-Memory STWorkProcessor-1] c.t.b.p.g.L.t.b.s.p.j.M.Log - Sending 5 Queue Messages
11:54:01.409 INFO [bwThread:In-Memory STWorkProcessor-1] c.t.b.p.g.L.t.b.s.p.j.M.Log1 - Finished sending 5 Queue messages. Selecting 3rd Message...
11:54:01.475 INFO [bwThread:In-Memory STWorkProcessor-2] c.t.b.p.g.L.t.b.s.p.j.M.Log2 - Selected 3rd message,. Message = This is message number 3
The MessageSelector.log output file is generated at C:\tmp\MessageSelector folder containing following information based on the message selector.
Sending 5 Queue Messages.
Finished sending 5 Queue messages. Selecting 3rd Message...
Selected 3rd message,. Message = This is message number 3