[ 
https://issues.apache.org/jira/browse/ARTEMIS-2390?focusedWorklogId=268212&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-268212
 ]

ASF GitHub Bot logged work on ARTEMIS-2390:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Jun/19 04:47
            Start Date: 27/Jun/19 04:47
    Worklog Time Spent: 10m 
      Work Description: jdanekrh commented on pull request #2725: ARTEMIS-2390 
JMSMessageID header can be null when messages are cross-protocol
URL: https://github.com/apache/activemq-artemis/pull/2725#discussion_r297139047
 
 

 ##########
 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:
   There should be a test for that. Lets say, 
https://invent.kde.org/snippets/280
   
   The results of that test on this PR at this moment (which is after the fix 
mentioned above) are
   
   ```
   x [sender=OPENWIRE,consumer=<anything>]
   x [sender=CORE,consumer=OPENWIRE]
   ✓ [sender=CORE,consumer=CORE]
   ✓ [sender=CORE,consumer=AMQP]
   x [sender=AMQP,consumer=OPENWIRE]
   ✓ [sender=AMQP,consumer=CORE]
   ✓ [sender=AMQP,consumer=AMQP]
   ```
 
----------------------------------------------------------------
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 268212)
    Time Spent: 20m  (was: 10m)

> JMSMessageID header can be null when messages are cross-protocol
> ----------------------------------------------------------------
>
>                 Key: ARTEMIS-2390
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2390
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.9.0
>            Reporter: Howard Gao
>            Assignee: Howard Gao
>            Priority: Major
>             Fix For: 2.10.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> If a jms client (be it openwire, amqp, or core jms) receives a message that 
> is from a different protocol, the JMSMessageID maybe null when the jms client 
> expects it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to