[ https://issues.apache.org/jira/browse/ARTEMIS-283?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14977881#comment-14977881 ]
Petter Nordlander commented on ARTEMIS-283: ------------------------------------------- 1. The primary use case I thought of is to create management scripts etc to deal with JMS messages regardless of which producer. Could also be GUI listings/dashboards etc. The JMSMessageID is set specifically in listings for messages produced with HornetQ/Core JMS provider. Without a clear ID to correlate with a message, from a JMS standpoint, you have no clue which messages you have listed, only that there are messages some properties and a timestamp. 2. Sure - but I'm not talking about messages produced with non-jms apis. But with OpenWire JMS Client (ActiveMQ 5.12.1 in this case) and Proton JMS AMQP1.0 v 0.32 client. I agree that it won't make sense for messages produced with MQTT or Stomp or.. other non JMS producers. As you can see in the listings above, a lot of JMS headers (JMSDeliveryMode among others) are actually set for all producers. Only JMSMessageID is missing. > Protocol independent JMSMessageID from management interface > ----------------------------------------------------------- > > Key: ARTEMIS-283 > URL: https://issues.apache.org/jira/browse/ARTEMIS-283 > Project: ActiveMQ Artemis > Issue Type: Bug > Components: Broker > Affects Versions: 1.1.0 > Reporter: Petter Nordlander > Priority: Minor > > The Management interface (JMX) has a listMessagesAsJSON operation on JMS > queues. > Listing JMS messages would not make sense if there is not a JMSMessageID to > correlate with. This works only for messages produced with Artemis "Core JMS" > protocol (i.e. HornetQ wire protocol). Messages produced with AMQP (proton) > and OpenWire JMS clients does not contain the JMSMessageID property. > This property is vital to make GUIs, management scripts and whatnot. > Example: > Three messages in the following order: Artemis JMS, OpenWire, AMQP > {code:javascript} > [ > { > "JMSPriority":4, > "JMSMessageID":"ID:11d61bfc-7c8f-11e5-b67d-fbf95a4499b8", > "address":"jms.queue.a1", > "JMSExpiration":0, > "__AMQ_CID":"11d1d638-7c8f-11e5-b67d-fbf95a4499b8", > "JMSTimestamp":1445938962608, > "messageID":134336, > "JMSDeliveryMode":"PERSISTENT" > }, > { > "address":"jms.queue.a1", > "JMSExpiration":0, > "JMSTimestamp":1445938969309, > > "__HDR_MARSHALL_PROP":[0,0,0,1,0,6,118,101,110,100,111,114,9,0,3,97,109,113], > "messageID":134354, > "__HDR_GROUP_SEQUENCE":0, > > "__HDR_PRODUCER_ID":[0,0,0,61,123,1,43,0,52,73,68,58,80,101,116,116,101,114,115,45,77,97,99,66,111,111,107,45,80,114,111,46,108,111,99,97,108,45,54,52,53,55,52,45,49,52,52,53,57,51,56,57,54,57,49,53,54,45,49,58,49,0,1,0,1], > "JMSDeliveryMode":"PERSISTENT", > "JMSPriority":4, > "__HDR_COMMAND_ID":6, > "__HDR_ARRIVAL":0, > "__HDR_REDELIVER_COUNTER":0, > > "__HDR_MESSAGE_ID":[0,0,0,65,110,2,-82,2,123,0,52,73,68,58,80,101,116,116,101,114,115,45,77,97,99,66,111,111,107,45,80,114,111,46,108,111,99,97,108,45,54,52,53,55,52,45,49,52,52,53,57,51,56,57,54,57,49,53,54,45,49,58,49,0,1,0,1,0,1], > "__HDR_DROPPABLE":false, > "__HDR_BROKER_IN_TIME":1445938969310 > }, > { > "JMS_AMQP_NATIVE":false, > "JMSPriority":4, > "address":"jms.queue.a1", > "JMSExpiration":0, > "JMS_AMQP_MESSAGE_FORMAT":0, > "JMSTimestamp":1445939704838, > "messageID":134376, > "JMSDeliveryMode":"PERSISTENT" > } > ] > {code} > Corresponding Message Ids would be (read from JMS interface). > Core: JMSMessageID: 783cf118-7c91-11e5-9a09-b3c5f39ba469:0:0:-1 > OpenWire: JMSMessageID: > ID:Petters-MacBook-Pro.local-64574-1445938969156-1:1:1:1:1 > AMQP: JMSMessageID: 783d1829-7c91-11e5-9a09-b3c5f39ba469:0:0:-1 > Problem is in QueueCtrlImpl which uses core-jms-client to convert messages > from core to Jms Map. It consider all messages as core messages. Logic from > each protocol/client should be used on respective message. > Map<String, Object> jmsMessage = > ActiveMQMessage.coreMaptoJMSMap(coreMessage); -- This message was sent by Atlassian JIRA (v6.3.4#6332)