gaohoward commented on a change in pull request #2725: AETEMIS-2390
JMSMessageID header can be null when messages are cross-protocol
URL: https://github.com/apache/activemq-artemis/pull/2725#discussion_r296265728
##########
File path:
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/converter/CoreAmqpConverter.java
##########
@@ -159,6 +160,12 @@ public static AMQPMessage fromCore(ICoreMessage
coreMessage) throws Exception {
} catch (ActiveMQAMQPIllegalStateException e) {
properties.setMessageId(messageId);
}
+ } else {
+ if (message.getInnerMessage().getUserID() != null) {
+ properties.setMessageId("ID:" +
message.getInnerMessage().getUserID().toString());
+ } else {
+ properties.setMessageId("ID: " +
UUIDGenerator.getInstance().generateStringUUID());
Review comment:
Yes that's true. If the core message doesn't have a userID, it should be
kept as null.
I'll remove the line.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services