Anyway just for reference, if you decide to adopt the solution 1 you can find some good reference in: The property that you're probably interested in and that you should set before sending the message is JMSCorrelationID that will be set to 1 for the first message, 2 for the second one and so on.ġ) Since you're more interested in the message selector, you can skip to the next bullet. Here some more info about the implementation of the two solutions. Of messages based on a selection criteria or, in other words, a JMSĬlient can choose only those messages that it is interested in. JMS programs can take advantage of this facility to select a subset To the JMS message header (outside the actual body of the message). The JMS message provides a facility to provide user-defined metadata Message Selectors allow content based retrieval of specific messages using SQL92-query functions. If you adopt this solution you have 2 options to achieve your goal:ġ) modify the receiver business logic to check the the header of the message Ģ) (probably the cleaner approach if you're using MQ) use something called MESSAGE SELECTOR. It's good practice to add a progressive number to the message header and use it to handle the messages as you please. That means that if you relay on the order of the messages received, you can get easily in trouble. I think that you should give more info about what you're trying to achieve.Īnyway if you read the specs of some JMS implementation like MQ you'll see that the FIFO order is not guaranteed at 100%.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |