0
votes

We have an application using Apache Camel 2.15.2 and Apache Qpid 0.4.0 that sends and receives messages over Amqp to a Microsoft Service Bus 1.1.

We upgraded Qpid recently from the older Qpid 0.32 and now we have a problem that we cannot set the messageId of the AMQP message to a UUID which is the requirement of the receiver. The messageId that is set is instead a string created in the JmsSession-class within Qpid. For example it looks like: "CLIENT115-61957-114498109876-0:15:1-1"

In this file: https://github.com/apache/qpid-jms/blob/master/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsSession.java we can see the following:

  1. On row 709 the messageId is created by calling the method getNextMessageId(producer)
  2. On row 923 we see that this messageId is generated by using the producers id and a message sequence.

This could never produce a message id formatted as a UUID. Am I missing something or is it simply not possible to set the messageId to a UUID using Apache QPID?

1

1 Answers

1
votes

The client does not and can not set a UUID as the MessageID and you should never depend on the JMSMessageID value being a specific format as this is a vendor specific value which can and will be different between differing JMS client libraries.

If your applications depend on messages having a specific ID assigned to them that can be correlated by your receiver application then you should use message properties for this as that's what they are there for.