After a lot of testing I have determined the cause of an issue I am having when using 2 different activeMQ JMS endpoints in the same route. Apparently after the first JMS queue is used, the message back will have a bunch of headers set such as JMSCorrelationId, messageId, JMSMessageId, etc.
Now it seems that when the second JMS queue is called the values on the exchange for these headers is used which invariably causes message collisions.
My question is, is there a way to remove headers, or with regards to multiple JMS queues to ensure the correlation and message IDs are always originated with respect to the proper queue and message?
Upon further investigation it seems to not be that simple. The basis of the route is as follows:
Send request to JMS Queue A -> Splitter on Response -> For each split, JMS Queue B
So it seems that after A is evaluated, if you reset the JMS headers servicemix will start throwing null pointer exceptions.
I don't have enough understanding of the activeMQ endpoint lifecycle to really troubleshoot this much more, so any insight or ideas would be helpful.
I have tested and if I remove Queue A and instead mimic it's behavior witha static message that gets split, there are no collisions and the JMS Ids do not remain static as they do when Queue A is in scope.