tJMSListener with Sequence Key - process messages in order
Hello. I want to listen to JMS queue, but I need to process the messages in order of which they are published. If one application has 2 editions of a message published to the queue (insert and then delete), and I have 3 JMS listeners, I can't promiss that the insert will be processed before the delete. Some designers have a solution for that, like Tibco BW Designer - I can set a sequence key which guarantees that no two messages are processed at the same time with the same key, thus ensuring that the insert command will be processed before the delete one. Is there a solution for this in Talend? For the sake of the issue, I'm using tibjms.jar. Thank you!
the corresponding feature in the JMS standard would be Message Groups which are implemented with the standard JMS Group ID message header. See this link for a description of how to do it with ActiveMQ
http://activemq.apache.org/message-groups.html . Basically you just want to set the GroupId header to the (possibly composite) primary key of the table you are updating.