You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by ronsho <ro...@ronsho.com> on 2011/03/06 14:37:58 UTC
ActiveMQ time in queue
Hello,
I was wondering if there is a way to retrieve the time in queue of a
message.
Thanks,
Ron.
--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-time-in-queue-tp3337589p3337589.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ time in queue
Posted by ronsho <ro...@ronsho.com>.
This is very helpful, thanks!
One follow up question - how would the broker behave when the message hopped
between two instances?
For example, message was put to one broker on a specific machine, and hop to
another broker on a different machine (clocks between the machines can be
either synced or not synced)
Thanks,
Ron,
--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-time-in-queue-tp3337589p3337663.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: ActiveMQ time in queue
Posted by Reynald Borer <re...@gmail.com>.
Hi Ron,
If you want to see how long a message stayed in the broker, you can compute this value by yourself. On each message processed by ActiveMQ, you can find two properties:
- brokerInTime: the time when the message arrived in the broker
- brokerOutTime: the time the message left the broker
By deducing the first one from the second, you can find the time the message stayed in the broker.
See the javadoc of the "Message" class for more details: http://activemq.apache.org/maven/5.3.1/activemq-core/apidocs/org/apache/activemq/command/Message.html
Best regards,
Reynald
P.S: special message for the ActiveMQ team: the javadoc link on the homepage is still referencing the 5.3.1 version, not the latest one.
On Sunday, March 6, 2011 at 14:37 , ronsho wrote:
> Hello,
>
> I was wondering if there is a way to retrieve the time in queue of a
> message.
>
> Thanks,
> Ron.
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-time-in-queue-tp3337589p3337589.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>