You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Petter Nordlander (JIRA)" <ji...@apache.org> on 2015/10/27 11:13:27 UTC

[jira] [Created] (ARTEMIS-283) Protocol independent JMSMessageID from management interface

Petter Nordlander created ARTEMIS-283:
-----------------------------------------

             Summary: 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:json}
[
	{
		"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

So. The idea is correct this and make a 1-1 relation between JMSMessageID listed from the management interface with the real JMSMessageID used by JMS clients. I.e. It should be possible to list message id:s and browse the corresponding messages using a JMS client with selector.


Use case: Management script, GUIs etc.




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)