I am writing a Java batch which is listening messages from a queue (Oracle AQ) and sending them to another queue (Tibco EMS), where they are processed by a Tibco process (BW).
The problem is that the Oracle AQ driver automatically add some properties to messages (JMSXGroupID, JMSXGroupSeq) which cause errors when they are processed by Tibco process because they have bad values : JMSXGroupSeq should be an int but is set to null. Tibco falls into error when trying to parse message properties...
So I would like to remove only these 2 properties from all messages but it seems that the jms api only offers a clearProperties() method but no single property remove method (I'm using ths javax.jms.Message interface).
For now, I can see two solutions :
set a correct value to these 2 properties, as I'm assuming they will not be used further by Tibco
read all properties and reconstruct the messages without the 2 which cause problem. But this approach is very ugly...
Does anyone have any other solution?