You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by COURTAULT Francois <fr...@thalesgroup.com> on 2019/07/12 17:45:01 UTC

Is there a way to monitor delayed message ?

Hello

The question is in the subject.
Is it possible to use JMX ? I have tried to find some counters without any success :(
Only:

*         DequeueCount

*         DispatchCount

*         EnqueueCount

*         ExpiredCount

*         InFlightCount

But no DelayedCount !

Does JMS 2.0 API can be used  for delaying message (eg setDeliveryDelay method on a JMSProducer) ?


Best Regards.

________________________________
This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.

Re: Is there a way to monitor delayed message ?

Posted by Tim Bain <tb...@alumni.duke.edu>.
Sounds great. And my expectation was never that the getAllJobs() method
would be what you'd use long-term, just that it would give you an option
for right now, to tide you over until this enhancement gets implemented. So
hopefully it's better than not being able to do this at all.

Tim

On Thu, Jul 18, 2019, 10:34 AM COURTAULT Francois <
francois.courtault@thalesgroup.com> wrote:

> Hello,
>
> In fact this is not a bug. The getAllJobs required a start and end time.
> So it's quite difficult to use regarding what I want to monitor: at t
> time, I want to get the number of delayed messages.
>
> This is the reason why I have submitted a new enhancement request:
> https://issues.apache.org/jira/browse/AMQ-7246
>
> Best Regards.
>
> -----Original Message-----
> From: COURTAULT Francois
> Sent: jeudi 18 juillet 2019 11:20
> To: users@activemq.apache.org
> Subject: RE: Is there a way to monitor delayed message ?
>
> Hello,
>
> Submitted: https://issues.apache.org/jira/browse/AMQ-7243
>
> Best Regards.
>
> -----Original Message-----
> From: Tim Bain [mailto:tbain@alumni.duke.edu]
> Sent: jeudi 18 juillet 2019 06:47
> To: ActiveMQ Users <us...@activemq.apache.org>
> Subject: Re: Is there a way to monitor delayed message ?
>
> Please submit that bug report to the ActiveMQ JIRA. Nothing in the stack
> trace looks to me like it's related to Tomee; this one looks like it's
> squarely on us.
>
> Sorry that due to this bug there's no out-of-the-box way to do what you're
> looking for.
>
> Tim
>
> On Wed, Jul 17, 2019, 7:01 AM COURTAULT Francois <
> francois.courtault@thalesgroup.com> wrote:
>
> > Hello Tim,
> >
> > Forgot to mention that I am using TomEE 8.0.0 M3 with ActiveMQ 5.15.6.
> > I have called getAllJobs on JobScheduler MBean and get an exception:
> > javax.management.RuntimeMBeanException: java.lang.NullPointerException
> > at
> > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultM
> > BeanServerInterceptor.java:839)
> > at
> > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBea
> > nException(DefaultMBeanServerInterceptor.java:852)
> > at
> >
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:821)
> >    ....
> > Caused by: java.lang.NullPointerException at
> > java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1439)
> > at java.text.DateFormat.parse(DateFormat.java:364)
> > at
> > org.apache.activemq.broker.scheduler.JobSupport.getDataTime(JobSupport
> > .java:36)
> > at
> > org.apache.activemq.broker.jmx.JobSchedulerView.getAllJobs(JobSchedule
> > rView.java:70)
> >
> > Should I report this issue to ActiveMQ JIRA as well as TomEE JIRA ?
> >
> > I also will submit a JIRA for having delyed message counter.
> >
> >
> > Best Regards.
> >
> > -----Original Message-----
> > From: Tim Bain [mailto:tbain@alumni.duke.edu]
> > Sent: mardi 16 juillet 2019 14:48
> > To: ActiveMQ Users <us...@activemq.apache.org>
> > Subject: Re: Is there a way to monitor delayed message ?
> >
> > The JobScheduler MBean that Tim referenced has a getAllJobs() method
> > that you could use to get a count right now.
> >
> > Longer term, if you want to suggest that counters be added to that
> > MBean, please submit an enhancement request in JIRA. And of course the
> > only way to guarantee that an enhancement you care about on an
> > open-source project gets implemented is to do it yourself, so if you
> > felt like tackling it and submitting a pull request, it would be
> > welcome. If not, you'll have to hope that someone else thinks it's
> > important enough to spend their time implementing.
> >
> > Tim
> >
> > On Sat, Jul 13, 2019, 10:54 AM COURTAULT Francois <
> > francois.courtault@thalesgroup.com> wrote:
> >
> > > Hello,
> > >
> > > Sorry I haven't seen the reply. I do confirm that the questions are
> > > about 5.x.
> > > The only entries I have are
> > >    -  JobScheduler having JMS MBean with no attribute linked to
> > > scheduled store
> > >    - PersistenceAdapter having a KahaDBPersistenceAdapter: same story
> > >    - Queue having a myQueue: same story
> > >    -Topic ....
> > >
> > > So I think this kind is missing and should be added in JMX !
> > >
> > > Best Regards.
> > > -----Original Message-----
> > > From: Tim Bain [mailto:tbain@alumni.duke.edu]
> > > Sent: samedi 13 juillet 2019 18:24
> > > To: ActiveMQ Users <us...@activemq.apache.org>
> > > Subject: Re: Is there a way to monitor delayed message ?
> > >
> > > As Tim Bish wrote in his answer here (
> > >
> > > https://stac
> > > koverflow.com%2Fquestions%2F21747227%2Fview-delayed-messages-in-acti
> > > ve
> > > mq&amp;data=02%7C01%7CFrancois.Courtault%40gemalto.com%7Cf2eac8cf76a
> > > e4
> > > 521c51308d709ebedfe%7C37d0a9db7c464096bfe31add5b495d6d%7C0%7C1%7C636
> > > 98
> > > 8781235668227&amp;sdata=iXKzhLNn%2FCHYGycdw%2FVLzhwKakY%2FMNIyFvmzeO
> > > w3
> > > 9Xg%3D&amp;reserved=0
> > > ),
> > > "The scheduled messages are kept in a separate store and only
> > > injected into the broker once their scheduled time arrives so they
> > > won't show up in the web console."
> > >
> > > So if any JMX counters exist, they would be 1) global across all
> > > scheduled messages rather than per-destination, and 2) associated
> > > with the MBeans for the scheduled store (if those exist) rather than
> > > with the MBeans for individual destinations. I don't personally know
> > > whether the scheduled store actually has MBeans, but that should be
> > > straightforward for you to check.
> > >
> > > Tim
> > >
> > > On Fri, Jul 12, 2019, 10:05 PM Justin Bertram <jb...@apache.org>
> > wrote:
> > >
> > > > The names of the metrics he mentioned match those from 5.x and not
> > > > Artemis so I assume he's asking about 5.x.
> > > >
> > > > However, it's worth noting that Artemis does track
> > > > delayed/scheduled messages using the ScheduledCount metric on the
> QueueControl MBean.
> > > > I don't see a way to do this in 5.x. Artemis also supports JMS 2.0
> > > > whereas 5.x doesn't.
> > > >
> > > >
> > > > Justin
> > > >
> > > > On Fri, Jul 12, 2019 at 9:25 PM Tim Bain <tb...@alumni.duke.edu>
> > wrote:
> > > >
> > > > > Is this question about 5.x or Artemis?
> > > > >
> > > > > Tim
> > > > >
> > > > > On Fri, Jul 12, 2019, 5:05 PM COURTAULT Francois <
> > > > > francois.courtault@thalesgroup.com> wrote:
> > > > >
> > > > > > Hello
> > > > > >
> > > > > > The question is in the subject.
> > > > > > Is it possible to use JMX ? I have tried to find some counters
> > > > > > without
> > > > > any
> > > > > > success :(
> > > > > > Only:
> > > > > >
> > > > > > *         DequeueCount
> > > > > >
> > > > > > *         DispatchCount
> > > > > >
> > > > > > *         EnqueueCount
> > > > > >
> > > > > > *         ExpiredCount
> > > > > >
> > > > > > *         InFlightCount
> > > > > >
> > > > > > But no DelayedCount !
> > > > > >
> > > > > > Does JMS 2.0 API can be used  for delaying message (eg
> > > > > > setDeliveryDelay method on a JMSProducer) ?
> > > > > >
> > > > > >
> > > > > > Best Regards.
> > > > > >
> > > > > > ________________________________ This message and any
> > > > > > attachments are intended solely for the addressees and may
> > > > > > contain confidential information. Any unauthorized use or
> > > > > > disclosure, either whole or partial, is
> > > prohibited.
> > > > > > E-mails are susceptible to alteration. Our company shall not
> > > > > > be liable
> > > > > for
> > > > > > the message if altered, changed or falsified. If you are not
> > > > > > the
> > > > intended
> > > > > > recipient of this message, please delete it and notify the
> sender.
> > > > > > Although all reasonable efforts have been made to keep this
> > > > transmission
> > > > > > free from viruses, the sender will not be liable for damages
> > > > > > caused by
> > > > a
> > > > > > transmitted virus.
> > > > > >
> > > > >
> > > >
> > > ________________________________
> > >  This message and any attachments are intended solely for the
> > > addressees and may contain confidential information. Any
> > > unauthorized use or disclosure, either whole or partial, is prohibited.
> > > E-mails are susceptible to alteration. Our company shall not be
> > > liable for the message if altered, changed or falsified. If you are
> > > not the intended recipient of this message, please delete it and
> > > notify the
> > sender.
> > > Although all reasonable efforts have been made to keep this
> > > transmission free from viruses, the sender will not be liable for
> > > damages caused by a transmitted virus.
> > >
> > ________________________________
> >  This message and any attachments are intended solely for the
> > addressees and may contain confidential information. Any unauthorized
> > use or disclosure, either whole or partial, is prohibited.
> > E-mails are susceptible to alteration. Our company shall not be liable
> > for the message if altered, changed or falsified. If you are not the
> > intended recipient of this message, please delete it and notify the
> sender.
> > Although all reasonable efforts have been made to keep this
> > transmission free from viruses, the sender will not be liable for
> > damages caused by a transmitted virus.
> >
> ________________________________
>  This message and any attachments are intended solely for the addressees
> and may contain confidential information. Any unauthorized use or
> disclosure, either whole or partial, is prohibited.
> E-mails are susceptible to alteration. Our company shall not be liable for
> the message if altered, changed or falsified. If you are not the intended
> recipient of this message, please delete it and notify the sender.
> Although all reasonable efforts have been made to keep this transmission
> free from viruses, the sender will not be liable for damages caused by a
> transmitted virus.
>

RE: Is there a way to monitor delayed message ?

Posted by COURTAULT Francois <fr...@thalesgroup.com>.
Hello,

In fact this is not a bug. The getAllJobs required a start and end time.
So it's quite difficult to use regarding what I want to monitor: at t time, I want to get the number of delayed messages.

This is the reason why I have submitted a new enhancement request: https://issues.apache.org/jira/browse/AMQ-7246

Best Regards.

-----Original Message-----
From: COURTAULT Francois
Sent: jeudi 18 juillet 2019 11:20
To: users@activemq.apache.org
Subject: RE: Is there a way to monitor delayed message ?

Hello,

Submitted: https://issues.apache.org/jira/browse/AMQ-7243

Best Regards.

-----Original Message-----
From: Tim Bain [mailto:tbain@alumni.duke.edu]
Sent: jeudi 18 juillet 2019 06:47
To: ActiveMQ Users <us...@activemq.apache.org>
Subject: Re: Is there a way to monitor delayed message ?

Please submit that bug report to the ActiveMQ JIRA. Nothing in the stack trace looks to me like it's related to Tomee; this one looks like it's squarely on us.

Sorry that due to this bug there's no out-of-the-box way to do what you're looking for.

Tim

On Wed, Jul 17, 2019, 7:01 AM COURTAULT Francois < francois.courtault@thalesgroup.com> wrote:

> Hello Tim,
>
> Forgot to mention that I am using TomEE 8.0.0 M3 with ActiveMQ 5.15.6.
> I have called getAllJobs on JobScheduler MBean and get an exception:
> javax.management.RuntimeMBeanException: java.lang.NullPointerException
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultM
> BeanServerInterceptor.java:839)
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBea
> nException(DefaultMBeanServerInterceptor.java:852)
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:821)
>    ....
> Caused by: java.lang.NullPointerException at
> java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1439)
> at java.text.DateFormat.parse(DateFormat.java:364)
> at
> org.apache.activemq.broker.scheduler.JobSupport.getDataTime(JobSupport
> .java:36)
> at
> org.apache.activemq.broker.jmx.JobSchedulerView.getAllJobs(JobSchedule
> rView.java:70)
>
> Should I report this issue to ActiveMQ JIRA as well as TomEE JIRA ?
>
> I also will submit a JIRA for having delyed message counter.
>
>
> Best Regards.
>
> -----Original Message-----
> From: Tim Bain [mailto:tbain@alumni.duke.edu]
> Sent: mardi 16 juillet 2019 14:48
> To: ActiveMQ Users <us...@activemq.apache.org>
> Subject: Re: Is there a way to monitor delayed message ?
>
> The JobScheduler MBean that Tim referenced has a getAllJobs() method
> that you could use to get a count right now.
>
> Longer term, if you want to suggest that counters be added to that
> MBean, please submit an enhancement request in JIRA. And of course the
> only way to guarantee that an enhancement you care about on an
> open-source project gets implemented is to do it yourself, so if you
> felt like tackling it and submitting a pull request, it would be
> welcome. If not, you'll have to hope that someone else thinks it's
> important enough to spend their time implementing.
>
> Tim
>
> On Sat, Jul 13, 2019, 10:54 AM COURTAULT Francois <
> francois.courtault@thalesgroup.com> wrote:
>
> > Hello,
> >
> > Sorry I haven't seen the reply. I do confirm that the questions are
> > about 5.x.
> > The only entries I have are
> >    -  JobScheduler having JMS MBean with no attribute linked to
> > scheduled store
> >    - PersistenceAdapter having a KahaDBPersistenceAdapter: same story
> >    - Queue having a myQueue: same story
> >    -Topic ....
> >
> > So I think this kind is missing and should be added in JMX !
> >
> > Best Regards.
> > -----Original Message-----
> > From: Tim Bain [mailto:tbain@alumni.duke.edu]
> > Sent: samedi 13 juillet 2019 18:24
> > To: ActiveMQ Users <us...@activemq.apache.org>
> > Subject: Re: Is there a way to monitor delayed message ?
> >
> > As Tim Bish wrote in his answer here (
> >
> > https://stac
> > koverflow.com%2Fquestions%2F21747227%2Fview-delayed-messages-in-acti
> > ve
> > mq&amp;data=02%7C01%7CFrancois.Courtault%40gemalto.com%7Cf2eac8cf76a
> > e4
> > 521c51308d709ebedfe%7C37d0a9db7c464096bfe31add5b495d6d%7C0%7C1%7C636
> > 98
> > 8781235668227&amp;sdata=iXKzhLNn%2FCHYGycdw%2FVLzhwKakY%2FMNIyFvmzeO
> > w3
> > 9Xg%3D&amp;reserved=0
> > ),
> > "The scheduled messages are kept in a separate store and only
> > injected into the broker once their scheduled time arrives so they
> > won't show up in the web console."
> >
> > So if any JMX counters exist, they would be 1) global across all
> > scheduled messages rather than per-destination, and 2) associated
> > with the MBeans for the scheduled store (if those exist) rather than
> > with the MBeans for individual destinations. I don't personally know
> > whether the scheduled store actually has MBeans, but that should be
> > straightforward for you to check.
> >
> > Tim
> >
> > On Fri, Jul 12, 2019, 10:05 PM Justin Bertram <jb...@apache.org>
> wrote:
> >
> > > The names of the metrics he mentioned match those from 5.x and not
> > > Artemis so I assume he's asking about 5.x.
> > >
> > > However, it's worth noting that Artemis does track
> > > delayed/scheduled messages using the ScheduledCount metric on the QueueControl MBean.
> > > I don't see a way to do this in 5.x. Artemis also supports JMS 2.0
> > > whereas 5.x doesn't.
> > >
> > >
> > > Justin
> > >
> > > On Fri, Jul 12, 2019 at 9:25 PM Tim Bain <tb...@alumni.duke.edu>
> wrote:
> > >
> > > > Is this question about 5.x or Artemis?
> > > >
> > > > Tim
> > > >
> > > > On Fri, Jul 12, 2019, 5:05 PM COURTAULT Francois <
> > > > francois.courtault@thalesgroup.com> wrote:
> > > >
> > > > > Hello
> > > > >
> > > > > The question is in the subject.
> > > > > Is it possible to use JMX ? I have tried to find some counters
> > > > > without
> > > > any
> > > > > success :(
> > > > > Only:
> > > > >
> > > > > *         DequeueCount
> > > > >
> > > > > *         DispatchCount
> > > > >
> > > > > *         EnqueueCount
> > > > >
> > > > > *         ExpiredCount
> > > > >
> > > > > *         InFlightCount
> > > > >
> > > > > But no DelayedCount !
> > > > >
> > > > > Does JMS 2.0 API can be used  for delaying message (eg
> > > > > setDeliveryDelay method on a JMSProducer) ?
> > > > >
> > > > >
> > > > > Best Regards.
> > > > >
> > > > > ________________________________ This message and any
> > > > > attachments are intended solely for the addressees and may
> > > > > contain confidential information. Any unauthorized use or
> > > > > disclosure, either whole or partial, is
> > prohibited.
> > > > > E-mails are susceptible to alteration. Our company shall not
> > > > > be liable
> > > > for
> > > > > the message if altered, changed or falsified. If you are not
> > > > > the
> > > intended
> > > > > recipient of this message, please delete it and notify the sender.
> > > > > Although all reasonable efforts have been made to keep this
> > > transmission
> > > > > free from viruses, the sender will not be liable for damages
> > > > > caused by
> > > a
> > > > > transmitted virus.
> > > > >
> > > >
> > >
> > ________________________________
> >  This message and any attachments are intended solely for the
> > addressees and may contain confidential information. Any
> > unauthorized use or disclosure, either whole or partial, is prohibited.
> > E-mails are susceptible to alteration. Our company shall not be
> > liable for the message if altered, changed or falsified. If you are
> > not the intended recipient of this message, please delete it and
> > notify the
> sender.
> > Although all reasonable efforts have been made to keep this
> > transmission free from viruses, the sender will not be liable for
> > damages caused by a transmitted virus.
> >
> ________________________________
>  This message and any attachments are intended solely for the
> addressees and may contain confidential information. Any unauthorized
> use or disclosure, either whole or partial, is prohibited.
> E-mails are susceptible to alteration. Our company shall not be liable
> for the message if altered, changed or falsified. If you are not the
> intended recipient of this message, please delete it and notify the sender.
> Although all reasonable efforts have been made to keep this
> transmission free from viruses, the sender will not be liable for
> damages caused by a transmitted virus.
>
________________________________
 This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.

RE: Is there a way to monitor delayed message ?

Posted by COURTAULT Francois <fr...@thalesgroup.com>.
Hello,

Submitted: https://issues.apache.org/jira/browse/AMQ-7243

Best Regards.

-----Original Message-----
From: Tim Bain [mailto:tbain@alumni.duke.edu]
Sent: jeudi 18 juillet 2019 06:47
To: ActiveMQ Users <us...@activemq.apache.org>
Subject: Re: Is there a way to monitor delayed message ?

Please submit that bug report to the ActiveMQ JIRA. Nothing in the stack trace looks to me like it's related to Tomee; this one looks like it's squarely on us.

Sorry that due to this bug there's no out-of-the-box way to do what you're looking for.

Tim

On Wed, Jul 17, 2019, 7:01 AM COURTAULT Francois < francois.courtault@thalesgroup.com> wrote:

> Hello Tim,
>
> Forgot to mention that I am using TomEE 8.0.0 M3 with ActiveMQ 5.15.6.
> I have called getAllJobs on JobScheduler MBean and get an exception:
> javax.management.RuntimeMBeanException: java.lang.NullPointerException
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultM
> BeanServerInterceptor.java:839)
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBea
> nException(DefaultMBeanServerInterceptor.java:852)
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:821)
>    ....
> Caused by: java.lang.NullPointerException at
> java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1439)
> at java.text.DateFormat.parse(DateFormat.java:364)
> at
> org.apache.activemq.broker.scheduler.JobSupport.getDataTime(JobSupport
> .java:36)
> at
> org.apache.activemq.broker.jmx.JobSchedulerView.getAllJobs(JobSchedule
> rView.java:70)
>
> Should I report this issue to ActiveMQ JIRA as well as TomEE JIRA ?
>
> I also will submit a JIRA for having delyed message counter.
>
>
> Best Regards.
>
> -----Original Message-----
> From: Tim Bain [mailto:tbain@alumni.duke.edu]
> Sent: mardi 16 juillet 2019 14:48
> To: ActiveMQ Users <us...@activemq.apache.org>
> Subject: Re: Is there a way to monitor delayed message ?
>
> The JobScheduler MBean that Tim referenced has a getAllJobs() method
> that you could use to get a count right now.
>
> Longer term, if you want to suggest that counters be added to that
> MBean, please submit an enhancement request in JIRA. And of course the
> only way to guarantee that an enhancement you care about on an
> open-source project gets implemented is to do it yourself, so if you
> felt like tackling it and submitting a pull request, it would be
> welcome. If not, you'll have to hope that someone else thinks it's
> important enough to spend their time implementing.
>
> Tim
>
> On Sat, Jul 13, 2019, 10:54 AM COURTAULT Francois <
> francois.courtault@thalesgroup.com> wrote:
>
> > Hello,
> >
> > Sorry I haven't seen the reply. I do confirm that the questions are
> > about 5.x.
> > The only entries I have are
> >    -  JobScheduler having JMS MBean with no attribute linked to
> > scheduled store
> >    - PersistenceAdapter having a KahaDBPersistenceAdapter: same story
> >    - Queue having a myQueue: same story
> >    -Topic ....
> >
> > So I think this kind is missing and should be added in JMX !
> >
> > Best Regards.
> > -----Original Message-----
> > From: Tim Bain [mailto:tbain@alumni.duke.edu]
> > Sent: samedi 13 juillet 2019 18:24
> > To: ActiveMQ Users <us...@activemq.apache.org>
> > Subject: Re: Is there a way to monitor delayed message ?
> >
> > As Tim Bish wrote in his answer here (
> >
> > https://stac
> > koverflow.com%2Fquestions%2F21747227%2Fview-delayed-messages-in-acti
> > ve
> > mq&amp;data=02%7C01%7CFrancois.Courtault%40gemalto.com%7Cf2eac8cf76a
> > e4
> > 521c51308d709ebedfe%7C37d0a9db7c464096bfe31add5b495d6d%7C0%7C1%7C636
> > 98
> > 8781235668227&amp;sdata=iXKzhLNn%2FCHYGycdw%2FVLzhwKakY%2FMNIyFvmzeO
> > w3
> > 9Xg%3D&amp;reserved=0
> > ),
> > "The scheduled messages are kept in a separate store and only
> > injected into the broker once their scheduled time arrives so they
> > won't show up in the web console."
> >
> > So if any JMX counters exist, they would be 1) global across all
> > scheduled messages rather than per-destination, and 2) associated
> > with the MBeans for the scheduled store (if those exist) rather than
> > with the MBeans for individual destinations. I don't personally know
> > whether the scheduled store actually has MBeans, but that should be
> > straightforward for you to check.
> >
> > Tim
> >
> > On Fri, Jul 12, 2019, 10:05 PM Justin Bertram <jb...@apache.org>
> wrote:
> >
> > > The names of the metrics he mentioned match those from 5.x and not
> > > Artemis so I assume he's asking about 5.x.
> > >
> > > However, it's worth noting that Artemis does track
> > > delayed/scheduled messages using the ScheduledCount metric on the QueueControl MBean.
> > > I don't see a way to do this in 5.x. Artemis also supports JMS 2.0
> > > whereas 5.x doesn't.
> > >
> > >
> > > Justin
> > >
> > > On Fri, Jul 12, 2019 at 9:25 PM Tim Bain <tb...@alumni.duke.edu>
> wrote:
> > >
> > > > Is this question about 5.x or Artemis?
> > > >
> > > > Tim
> > > >
> > > > On Fri, Jul 12, 2019, 5:05 PM COURTAULT Francois <
> > > > francois.courtault@thalesgroup.com> wrote:
> > > >
> > > > > Hello
> > > > >
> > > > > The question is in the subject.
> > > > > Is it possible to use JMX ? I have tried to find some counters
> > > > > without
> > > > any
> > > > > success :(
> > > > > Only:
> > > > >
> > > > > *         DequeueCount
> > > > >
> > > > > *         DispatchCount
> > > > >
> > > > > *         EnqueueCount
> > > > >
> > > > > *         ExpiredCount
> > > > >
> > > > > *         InFlightCount
> > > > >
> > > > > But no DelayedCount !
> > > > >
> > > > > Does JMS 2.0 API can be used  for delaying message (eg
> > > > > setDeliveryDelay method on a JMSProducer) ?
> > > > >
> > > > >
> > > > > Best Regards.
> > > > >
> > > > > ________________________________ This message and any
> > > > > attachments are intended solely for the addressees and may
> > > > > contain confidential information. Any unauthorized use or
> > > > > disclosure, either whole or partial, is
> > prohibited.
> > > > > E-mails are susceptible to alteration. Our company shall not
> > > > > be liable
> > > > for
> > > > > the message if altered, changed or falsified. If you are not
> > > > > the
> > > intended
> > > > > recipient of this message, please delete it and notify the sender.
> > > > > Although all reasonable efforts have been made to keep this
> > > transmission
> > > > > free from viruses, the sender will not be liable for damages
> > > > > caused by
> > > a
> > > > > transmitted virus.
> > > > >
> > > >
> > >
> > ________________________________
> >  This message and any attachments are intended solely for the
> > addressees and may contain confidential information. Any
> > unauthorized use or disclosure, either whole or partial, is prohibited.
> > E-mails are susceptible to alteration. Our company shall not be
> > liable for the message if altered, changed or falsified. If you are
> > not the intended recipient of this message, please delete it and
> > notify the
> sender.
> > Although all reasonable efforts have been made to keep this
> > transmission free from viruses, the sender will not be liable for
> > damages caused by a transmitted virus.
> >
> ________________________________
>  This message and any attachments are intended solely for the
> addressees and may contain confidential information. Any unauthorized
> use or disclosure, either whole or partial, is prohibited.
> E-mails are susceptible to alteration. Our company shall not be liable
> for the message if altered, changed or falsified. If you are not the
> intended recipient of this message, please delete it and notify the sender.
> Although all reasonable efforts have been made to keep this
> transmission free from viruses, the sender will not be liable for
> damages caused by a transmitted virus.
>
________________________________
 This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.

Re: Is there a way to monitor delayed message ?

Posted by Tim Bain <tb...@alumni.duke.edu>.
Please submit that bug report to the ActiveMQ JIRA. Nothing in the stack
trace looks to me like it's related to Tomee; this one looks like it's
squarely on us.

Sorry that due to this bug there's no out-of-the-box way to do what you're
looking for.

Tim

On Wed, Jul 17, 2019, 7:01 AM COURTAULT Francois <
francois.courtault@thalesgroup.com> wrote:

> Hello Tim,
>
> Forgot to mention that I am using TomEE 8.0.0 M3 with ActiveMQ 5.15.6.
> I have called getAllJobs on JobScheduler MBean and get an exception:
> javax.management.RuntimeMBeanException: java.lang.NullPointerException
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:839)
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:852)
> at
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:821)
>    ....
> Caused by: java.lang.NullPointerException
> at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1439)
> at java.text.DateFormat.parse(DateFormat.java:364)
> at
> org.apache.activemq.broker.scheduler.JobSupport.getDataTime(JobSupport.java:36)
> at
> org.apache.activemq.broker.jmx.JobSchedulerView.getAllJobs(JobSchedulerView.java:70)
>
> Should I report this issue to ActiveMQ JIRA as well as TomEE JIRA ?
>
> I also will submit a JIRA for having delyed message counter.
>
>
> Best Regards.
>
> -----Original Message-----
> From: Tim Bain [mailto:tbain@alumni.duke.edu]
> Sent: mardi 16 juillet 2019 14:48
> To: ActiveMQ Users <us...@activemq.apache.org>
> Subject: Re: Is there a way to monitor delayed message ?
>
> The JobScheduler MBean that Tim referenced has a getAllJobs() method that
> you could use to get a count right now.
>
> Longer term, if you want to suggest that counters be added to that MBean,
> please submit an enhancement request in JIRA. And of course the only way to
> guarantee that an enhancement you care about on an open-source project gets
> implemented is to do it yourself, so if you felt like tackling it and
> submitting a pull request, it would be welcome. If not, you'll have to hope
> that someone else thinks it's important enough to spend their time
> implementing.
>
> Tim
>
> On Sat, Jul 13, 2019, 10:54 AM COURTAULT Francois <
> francois.courtault@thalesgroup.com> wrote:
>
> > Hello,
> >
> > Sorry I haven't seen the reply. I do confirm that the questions are
> > about 5.x.
> > The only entries I have are
> >    -  JobScheduler having JMS MBean with no attribute linked to
> > scheduled store
> >    - PersistenceAdapter having a KahaDBPersistenceAdapter: same story
> >    - Queue having a myQueue: same story
> >    -Topic ....
> >
> > So I think this kind is missing and should be added in JMX !
> >
> > Best Regards.
> > -----Original Message-----
> > From: Tim Bain [mailto:tbain@alumni.duke.edu]
> > Sent: samedi 13 juillet 2019 18:24
> > To: ActiveMQ Users <us...@activemq.apache.org>
> > Subject: Re: Is there a way to monitor delayed message ?
> >
> > As Tim Bish wrote in his answer here (
> >
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstac
> > koverflow.com%2Fquestions%2F21747227%2Fview-delayed-messages-in-active
> > mq&amp;data=02%7C01%7CFrancois.Courtault%40gemalto.com%7Cf2eac8cf76ae4
> > 521c51308d709ebedfe%7C37d0a9db7c464096bfe31add5b495d6d%7C0%7C1%7C63698
> > 8781235668227&amp;sdata=iXKzhLNn%2FCHYGycdw%2FVLzhwKakY%2FMNIyFvmzeOw3
> > 9Xg%3D&amp;reserved=0
> > ),
> > "The scheduled messages are kept in a separate store and only injected
> > into the broker once their scheduled time arrives so they won't show
> > up in the web console."
> >
> > So if any JMX counters exist, they would be 1) global across all
> > scheduled messages rather than per-destination, and 2) associated with
> > the MBeans for the scheduled store (if those exist) rather than with
> > the MBeans for individual destinations. I don't personally know
> > whether the scheduled store actually has MBeans, but that should be
> > straightforward for you to check.
> >
> > Tim
> >
> > On Fri, Jul 12, 2019, 10:05 PM Justin Bertram <jb...@apache.org>
> wrote:
> >
> > > The names of the metrics he mentioned match those from 5.x and not
> > > Artemis so I assume he's asking about 5.x.
> > >
> > > However, it's worth noting that Artemis does track delayed/scheduled
> > > messages using the ScheduledCount metric on the QueueControl MBean.
> > > I don't see a way to do this in 5.x. Artemis also supports JMS 2.0
> > > whereas 5.x doesn't.
> > >
> > >
> > > Justin
> > >
> > > On Fri, Jul 12, 2019 at 9:25 PM Tim Bain <tb...@alumni.duke.edu>
> wrote:
> > >
> > > > Is this question about 5.x or Artemis?
> > > >
> > > > Tim
> > > >
> > > > On Fri, Jul 12, 2019, 5:05 PM COURTAULT Francois <
> > > > francois.courtault@thalesgroup.com> wrote:
> > > >
> > > > > Hello
> > > > >
> > > > > The question is in the subject.
> > > > > Is it possible to use JMX ? I have tried to find some counters
> > > > > without
> > > > any
> > > > > success :(
> > > > > Only:
> > > > >
> > > > > *         DequeueCount
> > > > >
> > > > > *         DispatchCount
> > > > >
> > > > > *         EnqueueCount
> > > > >
> > > > > *         ExpiredCount
> > > > >
> > > > > *         InFlightCount
> > > > >
> > > > > But no DelayedCount !
> > > > >
> > > > > Does JMS 2.0 API can be used  for delaying message (eg
> > > > > setDeliveryDelay method on a JMSProducer) ?
> > > > >
> > > > >
> > > > > Best Regards.
> > > > >
> > > > > ________________________________ This message and any
> > > > > attachments are intended solely for the addressees and may
> > > > > contain confidential information. Any unauthorized use or
> > > > > disclosure, either whole or partial, is
> > prohibited.
> > > > > E-mails are susceptible to alteration. Our company shall not be
> > > > > liable
> > > > for
> > > > > the message if altered, changed or falsified. If you are not the
> > > intended
> > > > > recipient of this message, please delete it and notify the sender.
> > > > > Although all reasonable efforts have been made to keep this
> > > transmission
> > > > > free from viruses, the sender will not be liable for damages
> > > > > caused by
> > > a
> > > > > transmitted virus.
> > > > >
> > > >
> > >
> > ________________________________
> >  This message and any attachments are intended solely for the
> > addressees and may contain confidential information. Any unauthorized
> > use or disclosure, either whole or partial, is prohibited.
> > E-mails are susceptible to alteration. Our company shall not be liable
> > for the message if altered, changed or falsified. If you are not the
> > intended recipient of this message, please delete it and notify the
> sender.
> > Although all reasonable efforts have been made to keep this
> > transmission free from viruses, the sender will not be liable for
> > damages caused by a transmitted virus.
> >
> ________________________________
>  This message and any attachments are intended solely for the addressees
> and may contain confidential information. Any unauthorized use or
> disclosure, either whole or partial, is prohibited.
> E-mails are susceptible to alteration. Our company shall not be liable for
> the message if altered, changed or falsified. If you are not the intended
> recipient of this message, please delete it and notify the sender.
> Although all reasonable efforts have been made to keep this transmission
> free from viruses, the sender will not be liable for damages caused by a
> transmitted virus.
>

RE: Is there a way to monitor delayed message ?

Posted by COURTAULT Francois <fr...@thalesgroup.com>.
Hello Tim,

Forgot to mention that I am using TomEE 8.0.0 M3 with ActiveMQ 5.15.6.
I have called getAllJobs on JobScheduler MBean and get an exception:
javax.management.RuntimeMBeanException: java.lang.NullPointerException
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrow(DefaultMBeanServerInterceptor.java:839)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.rethrowMaybeMBeanException(DefaultMBeanServerInterceptor.java:852)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:821)
   ....
Caused by: java.lang.NullPointerException
at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1439)
at java.text.DateFormat.parse(DateFormat.java:364)
at org.apache.activemq.broker.scheduler.JobSupport.getDataTime(JobSupport.java:36)
at org.apache.activemq.broker.jmx.JobSchedulerView.getAllJobs(JobSchedulerView.java:70)

Should I report this issue to ActiveMQ JIRA as well as TomEE JIRA ?

I also will submit a JIRA for having delyed message counter.


Best Regards.

-----Original Message-----
From: Tim Bain [mailto:tbain@alumni.duke.edu]
Sent: mardi 16 juillet 2019 14:48
To: ActiveMQ Users <us...@activemq.apache.org>
Subject: Re: Is there a way to monitor delayed message ?

The JobScheduler MBean that Tim referenced has a getAllJobs() method that you could use to get a count right now.

Longer term, if you want to suggest that counters be added to that MBean, please submit an enhancement request in JIRA. And of course the only way to guarantee that an enhancement you care about on an open-source project gets implemented is to do it yourself, so if you felt like tackling it and submitting a pull request, it would be welcome. If not, you'll have to hope that someone else thinks it's important enough to spend their time implementing.

Tim

On Sat, Jul 13, 2019, 10:54 AM COURTAULT Francois < francois.courtault@thalesgroup.com> wrote:

> Hello,
>
> Sorry I haven't seen the reply. I do confirm that the questions are
> about 5.x.
> The only entries I have are
>    -  JobScheduler having JMS MBean with no attribute linked to
> scheduled store
>    - PersistenceAdapter having a KahaDBPersistenceAdapter: same story
>    - Queue having a myQueue: same story
>    -Topic ....
>
> So I think this kind is missing and should be added in JMX !
>
> Best Regards.
> -----Original Message-----
> From: Tim Bain [mailto:tbain@alumni.duke.edu]
> Sent: samedi 13 juillet 2019 18:24
> To: ActiveMQ Users <us...@activemq.apache.org>
> Subject: Re: Is there a way to monitor delayed message ?
>
> As Tim Bish wrote in his answer here (
>
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstac
> koverflow.com%2Fquestions%2F21747227%2Fview-delayed-messages-in-active
> mq&amp;data=02%7C01%7CFrancois.Courtault%40gemalto.com%7Cf2eac8cf76ae4
> 521c51308d709ebedfe%7C37d0a9db7c464096bfe31add5b495d6d%7C0%7C1%7C63698
> 8781235668227&amp;sdata=iXKzhLNn%2FCHYGycdw%2FVLzhwKakY%2FMNIyFvmzeOw3
> 9Xg%3D&amp;reserved=0
> ),
> "The scheduled messages are kept in a separate store and only injected
> into the broker once their scheduled time arrives so they won't show
> up in the web console."
>
> So if any JMX counters exist, they would be 1) global across all
> scheduled messages rather than per-destination, and 2) associated with
> the MBeans for the scheduled store (if those exist) rather than with
> the MBeans for individual destinations. I don't personally know
> whether the scheduled store actually has MBeans, but that should be
> straightforward for you to check.
>
> Tim
>
> On Fri, Jul 12, 2019, 10:05 PM Justin Bertram <jb...@apache.org> wrote:
>
> > The names of the metrics he mentioned match those from 5.x and not
> > Artemis so I assume he's asking about 5.x.
> >
> > However, it's worth noting that Artemis does track delayed/scheduled
> > messages using the ScheduledCount metric on the QueueControl MBean.
> > I don't see a way to do this in 5.x. Artemis also supports JMS 2.0
> > whereas 5.x doesn't.
> >
> >
> > Justin
> >
> > On Fri, Jul 12, 2019 at 9:25 PM Tim Bain <tb...@alumni.duke.edu> wrote:
> >
> > > Is this question about 5.x or Artemis?
> > >
> > > Tim
> > >
> > > On Fri, Jul 12, 2019, 5:05 PM COURTAULT Francois <
> > > francois.courtault@thalesgroup.com> wrote:
> > >
> > > > Hello
> > > >
> > > > The question is in the subject.
> > > > Is it possible to use JMX ? I have tried to find some counters
> > > > without
> > > any
> > > > success :(
> > > > Only:
> > > >
> > > > *         DequeueCount
> > > >
> > > > *         DispatchCount
> > > >
> > > > *         EnqueueCount
> > > >
> > > > *         ExpiredCount
> > > >
> > > > *         InFlightCount
> > > >
> > > > But no DelayedCount !
> > > >
> > > > Does JMS 2.0 API can be used  for delaying message (eg
> > > > setDeliveryDelay method on a JMSProducer) ?
> > > >
> > > >
> > > > Best Regards.
> > > >
> > > > ________________________________ This message and any
> > > > attachments are intended solely for the addressees and may
> > > > contain confidential information. Any unauthorized use or
> > > > disclosure, either whole or partial, is
> prohibited.
> > > > E-mails are susceptible to alteration. Our company shall not be
> > > > liable
> > > for
> > > > the message if altered, changed or falsified. If you are not the
> > intended
> > > > recipient of this message, please delete it and notify the sender.
> > > > Although all reasonable efforts have been made to keep this
> > transmission
> > > > free from viruses, the sender will not be liable for damages
> > > > caused by
> > a
> > > > transmitted virus.
> > > >
> > >
> >
> ________________________________
>  This message and any attachments are intended solely for the
> addressees and may contain confidential information. Any unauthorized
> use or disclosure, either whole or partial, is prohibited.
> E-mails are susceptible to alteration. Our company shall not be liable
> for the message if altered, changed or falsified. If you are not the
> intended recipient of this message, please delete it and notify the sender.
> Although all reasonable efforts have been made to keep this
> transmission free from viruses, the sender will not be liable for
> damages caused by a transmitted virus.
>
________________________________
 This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.

Re: Is there a way to monitor delayed message ?

Posted by Tim Bain <tb...@alumni.duke.edu>.
The JobScheduler MBean that Tim referenced has a getAllJobs() method that
you could use to get a count right now.

Longer term, if you want to suggest that counters be added to that MBean,
please submit an enhancement request in JIRA. And of course the only way to
guarantee that an enhancement you care about on an open-source project gets
implemented is to do it yourself, so if you felt like tackling it and
submitting a pull request, it would be welcome. If not, you'll have to hope
that someone else thinks it's important enough to spend their time
implementing.

Tim

On Sat, Jul 13, 2019, 10:54 AM COURTAULT Francois <
francois.courtault@thalesgroup.com> wrote:

> Hello,
>
> Sorry I haven't seen the reply. I do confirm that the questions are about
> 5.x.
> The only entries I have are
>    -  JobScheduler having JMS MBean with no attribute linked to scheduled
> store
>    - PersistenceAdapter having a KahaDBPersistenceAdapter: same story
>    - Queue having a myQueue: same story
>    -Topic ....
>
> So I think this kind is missing and should be added in JMX !
>
> Best Regards.
> -----Original Message-----
> From: Tim Bain [mailto:tbain@alumni.duke.edu]
> Sent: samedi 13 juillet 2019 18:24
> To: ActiveMQ Users <us...@activemq.apache.org>
> Subject: Re: Is there a way to monitor delayed message ?
>
> As Tim Bish wrote in his answer here (
>
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F21747227%2Fview-delayed-messages-in-activemq&amp;data=02%7C01%7CFrancois.Courtault%40gemalto.com%7Cde665092fb2242eb2db108d707aea2c3%7C37d0a9db7c464096bfe31add5b495d6d%7C0%7C1%7C636986318942272876&amp;sdata=ACpQJuP4WzrhFe%2FAlOtf3Je1wTRVa9YfWF6MWwfpkmk%3D&amp;reserved=0
> ),
> "The scheduled messages are kept in a separate store and only injected
> into the broker once their scheduled time arrives so they won't show up in
> the web console."
>
> So if any JMX counters exist, they would be 1) global across all scheduled
> messages rather than per-destination, and 2) associated with the MBeans for
> the scheduled store (if those exist) rather than with the MBeans for
> individual destinations. I don't personally know whether the scheduled
> store actually has MBeans, but that should be straightforward for you to
> check.
>
> Tim
>
> On Fri, Jul 12, 2019, 10:05 PM Justin Bertram <jb...@apache.org> wrote:
>
> > The names of the metrics he mentioned match those from 5.x and not
> > Artemis so I assume he's asking about 5.x.
> >
> > However, it's worth noting that Artemis does track delayed/scheduled
> > messages using the ScheduledCount metric on the QueueControl MBean. I
> > don't see a way to do this in 5.x. Artemis also supports JMS 2.0
> > whereas 5.x doesn't.
> >
> >
> > Justin
> >
> > On Fri, Jul 12, 2019 at 9:25 PM Tim Bain <tb...@alumni.duke.edu> wrote:
> >
> > > Is this question about 5.x or Artemis?
> > >
> > > Tim
> > >
> > > On Fri, Jul 12, 2019, 5:05 PM COURTAULT Francois <
> > > francois.courtault@thalesgroup.com> wrote:
> > >
> > > > Hello
> > > >
> > > > The question is in the subject.
> > > > Is it possible to use JMX ? I have tried to find some counters
> > > > without
> > > any
> > > > success :(
> > > > Only:
> > > >
> > > > *         DequeueCount
> > > >
> > > > *         DispatchCount
> > > >
> > > > *         EnqueueCount
> > > >
> > > > *         ExpiredCount
> > > >
> > > > *         InFlightCount
> > > >
> > > > But no DelayedCount !
> > > >
> > > > Does JMS 2.0 API can be used  for delaying message (eg
> > > > setDeliveryDelay method on a JMSProducer) ?
> > > >
> > > >
> > > > Best Regards.
> > > >
> > > > ________________________________
> > > > This message and any attachments are intended solely for the
> > > > addressees and may contain confidential information. Any
> > > > unauthorized use or disclosure, either whole or partial, is
> prohibited.
> > > > E-mails are susceptible to alteration. Our company shall not be
> > > > liable
> > > for
> > > > the message if altered, changed or falsified. If you are not the
> > intended
> > > > recipient of this message, please delete it and notify the sender.
> > > > Although all reasonable efforts have been made to keep this
> > transmission
> > > > free from viruses, the sender will not be liable for damages
> > > > caused by
> > a
> > > > transmitted virus.
> > > >
> > >
> >
> ________________________________
>  This message and any attachments are intended solely for the addressees
> and may contain confidential information. Any unauthorized use or
> disclosure, either whole or partial, is prohibited.
> E-mails are susceptible to alteration. Our company shall not be liable for
> the message if altered, changed or falsified. If you are not the intended
> recipient of this message, please delete it and notify the sender.
> Although all reasonable efforts have been made to keep this transmission
> free from viruses, the sender will not be liable for damages caused by a
> transmitted virus.
>

RE: Is there a way to monitor delayed message ?

Posted by COURTAULT Francois <fr...@thalesgroup.com>.
Hello,

Sorry I haven't seen the reply. I do confirm that the questions are about 5.x.
The only entries I have are
   -  JobScheduler having JMS MBean with no attribute linked to scheduled store
   - PersistenceAdapter having a KahaDBPersistenceAdapter: same story
   - Queue having a myQueue: same story
   -Topic ....

So I think this kind is missing and should be added in JMX !

Best Regards.
-----Original Message-----
From: Tim Bain [mailto:tbain@alumni.duke.edu]
Sent: samedi 13 juillet 2019 18:24
To: ActiveMQ Users <us...@activemq.apache.org>
Subject: Re: Is there a way to monitor delayed message ?

As Tim Bish wrote in his answer here (
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F21747227%2Fview-delayed-messages-in-activemq&amp;data=02%7C01%7CFrancois.Courtault%40gemalto.com%7Cde665092fb2242eb2db108d707aea2c3%7C37d0a9db7c464096bfe31add5b495d6d%7C0%7C1%7C636986318942272876&amp;sdata=ACpQJuP4WzrhFe%2FAlOtf3Je1wTRVa9YfWF6MWwfpkmk%3D&amp;reserved=0),
"The scheduled messages are kept in a separate store and only injected into the broker once their scheduled time arrives so they won't show up in the web console."

So if any JMX counters exist, they would be 1) global across all scheduled messages rather than per-destination, and 2) associated with the MBeans for the scheduled store (if those exist) rather than with the MBeans for individual destinations. I don't personally know whether the scheduled store actually has MBeans, but that should be straightforward for you to check.

Tim

On Fri, Jul 12, 2019, 10:05 PM Justin Bertram <jb...@apache.org> wrote:

> The names of the metrics he mentioned match those from 5.x and not
> Artemis so I assume he's asking about 5.x.
>
> However, it's worth noting that Artemis does track delayed/scheduled
> messages using the ScheduledCount metric on the QueueControl MBean. I
> don't see a way to do this in 5.x. Artemis also supports JMS 2.0
> whereas 5.x doesn't.
>
>
> Justin
>
> On Fri, Jul 12, 2019 at 9:25 PM Tim Bain <tb...@alumni.duke.edu> wrote:
>
> > Is this question about 5.x or Artemis?
> >
> > Tim
> >
> > On Fri, Jul 12, 2019, 5:05 PM COURTAULT Francois <
> > francois.courtault@thalesgroup.com> wrote:
> >
> > > Hello
> > >
> > > The question is in the subject.
> > > Is it possible to use JMX ? I have tried to find some counters
> > > without
> > any
> > > success :(
> > > Only:
> > >
> > > *         DequeueCount
> > >
> > > *         DispatchCount
> > >
> > > *         EnqueueCount
> > >
> > > *         ExpiredCount
> > >
> > > *         InFlightCount
> > >
> > > But no DelayedCount !
> > >
> > > Does JMS 2.0 API can be used  for delaying message (eg
> > > setDeliveryDelay method on a JMSProducer) ?
> > >
> > >
> > > Best Regards.
> > >
> > > ________________________________
> > > This message and any attachments are intended solely for the
> > > addressees and may contain confidential information. Any
> > > unauthorized use or disclosure, either whole or partial, is prohibited.
> > > E-mails are susceptible to alteration. Our company shall not be
> > > liable
> > for
> > > the message if altered, changed or falsified. If you are not the
> intended
> > > recipient of this message, please delete it and notify the sender.
> > > Although all reasonable efforts have been made to keep this
> transmission
> > > free from viruses, the sender will not be liable for damages
> > > caused by
> a
> > > transmitted virus.
> > >
> >
>
________________________________
 This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.

Re: Is there a way to monitor delayed message ?

Posted by Tim Bain <tb...@alumni.duke.edu>.
Looks like Tim beat me to it, and with a better answer.

Tim

On Sat, Jul 13, 2019, 10:23 AM Tim Bain <tb...@alumni.duke.edu> wrote:

> As Tim Bish wrote in his answer here (
> https://stackoverflow.com/questions/21747227/view-delayed-messages-in-activemq),
> "The scheduled messages are kept in a separate store and only injected into
> the broker once their scheduled time arrives so they won't show up in the
> web console."
>
> So if any JMX counters exist, they would be 1) global across all scheduled
> messages rather than per-destination, and 2) associated with the MBeans for
> the scheduled store (if those exist) rather than with the MBeans for
> individual destinations. I don't personally know whether the scheduled
> store actually has MBeans, but that should be straightforward for you to
> check.
>
> Tim
>
> On Fri, Jul 12, 2019, 10:05 PM Justin Bertram <jb...@apache.org> wrote:
>
>> The names of the metrics he mentioned match those from 5.x and not Artemis
>> so I assume he's asking about 5.x.
>>
>> However, it's worth noting that Artemis does track delayed/scheduled
>> messages using the ScheduledCount metric on the QueueControl MBean. I
>> don't
>> see a way to do this in 5.x. Artemis also supports JMS 2.0 whereas 5.x
>> doesn't.
>>
>>
>> Justin
>>
>> On Fri, Jul 12, 2019 at 9:25 PM Tim Bain <tb...@alumni.duke.edu> wrote:
>>
>> > Is this question about 5.x or Artemis?
>> >
>> > Tim
>> >
>> > On Fri, Jul 12, 2019, 5:05 PM COURTAULT Francois <
>> > francois.courtault@thalesgroup.com> wrote:
>> >
>> > > Hello
>> > >
>> > > The question is in the subject.
>> > > Is it possible to use JMX ? I have tried to find some counters without
>> > any
>> > > success :(
>> > > Only:
>> > >
>> > > *         DequeueCount
>> > >
>> > > *         DispatchCount
>> > >
>> > > *         EnqueueCount
>> > >
>> > > *         ExpiredCount
>> > >
>> > > *         InFlightCount
>> > >
>> > > But no DelayedCount !
>> > >
>> > > Does JMS 2.0 API can be used  for delaying message (eg
>> setDeliveryDelay
>> > > method on a JMSProducer) ?
>> > >
>> > >
>> > > Best Regards.
>> > >
>> > > ________________________________
>> > > This message and any attachments are intended solely for the
>> addressees
>> > > and may contain confidential information. Any unauthorized use or
>> > > disclosure, either whole or partial, is prohibited.
>> > > E-mails are susceptible to alteration. Our company shall not be liable
>> > for
>> > > the message if altered, changed or falsified. If you are not the
>> intended
>> > > recipient of this message, please delete it and notify the sender.
>> > > Although all reasonable efforts have been made to keep this
>> transmission
>> > > free from viruses, the sender will not be liable for damages caused
>> by a
>> > > transmitted virus.
>> > >
>> >
>>
>

Re: Is there a way to monitor delayed message ?

Posted by Tim Bain <tb...@alumni.duke.edu>.
As Tim Bish wrote in his answer here (
https://stackoverflow.com/questions/21747227/view-delayed-messages-in-activemq),
"The scheduled messages are kept in a separate store and only injected into
the broker once their scheduled time arrives so they won't show up in the
web console."

So if any JMX counters exist, they would be 1) global across all scheduled
messages rather than per-destination, and 2) associated with the MBeans for
the scheduled store (if those exist) rather than with the MBeans for
individual destinations. I don't personally know whether the scheduled
store actually has MBeans, but that should be straightforward for you to
check.

Tim

On Fri, Jul 12, 2019, 10:05 PM Justin Bertram <jb...@apache.org> wrote:

> The names of the metrics he mentioned match those from 5.x and not Artemis
> so I assume he's asking about 5.x.
>
> However, it's worth noting that Artemis does track delayed/scheduled
> messages using the ScheduledCount metric on the QueueControl MBean. I don't
> see a way to do this in 5.x. Artemis also supports JMS 2.0 whereas 5.x
> doesn't.
>
>
> Justin
>
> On Fri, Jul 12, 2019 at 9:25 PM Tim Bain <tb...@alumni.duke.edu> wrote:
>
> > Is this question about 5.x or Artemis?
> >
> > Tim
> >
> > On Fri, Jul 12, 2019, 5:05 PM COURTAULT Francois <
> > francois.courtault@thalesgroup.com> wrote:
> >
> > > Hello
> > >
> > > The question is in the subject.
> > > Is it possible to use JMX ? I have tried to find some counters without
> > any
> > > success :(
> > > Only:
> > >
> > > *         DequeueCount
> > >
> > > *         DispatchCount
> > >
> > > *         EnqueueCount
> > >
> > > *         ExpiredCount
> > >
> > > *         InFlightCount
> > >
> > > But no DelayedCount !
> > >
> > > Does JMS 2.0 API can be used  for delaying message (eg setDeliveryDelay
> > > method on a JMSProducer) ?
> > >
> > >
> > > Best Regards.
> > >
> > > ________________________________
> > > This message and any attachments are intended solely for the addressees
> > > and may contain confidential information. Any unauthorized use or
> > > disclosure, either whole or partial, is prohibited.
> > > E-mails are susceptible to alteration. Our company shall not be liable
> > for
> > > the message if altered, changed or falsified. If you are not the
> intended
> > > recipient of this message, please delete it and notify the sender.
> > > Although all reasonable efforts have been made to keep this
> transmission
> > > free from viruses, the sender will not be liable for damages caused by
> a
> > > transmitted virus.
> > >
> >
>

Re: Is there a way to monitor delayed message ?

Posted by Timothy Bish <ta...@gmail.com>.
On 7/13/19 12:04 AM, Justin Bertram wrote:
> The names of the metrics he mentioned match those from 5.x and not Artemis
> so I assume he's asking about 5.x.
>
> However, it's worth noting that Artemis does track delayed/scheduled
> messages using the ScheduledCount metric on the QueueControl MBean. I don't
> see a way to do this in 5.x. Artemis also supports JMS 2.0 whereas 5.x
> doesn't.

How to see what's been scheduled

https://github.com/apache/activemq/blob/master/activemq-broker/src/main/java/org/apache/activemq/broker/jmx/JobSchedulerViewMBean.java


>
>
> Justin
>
> On Fri, Jul 12, 2019 at 9:25 PM Tim Bain <tb...@alumni.duke.edu> wrote:
>
>> Is this question about 5.x or Artemis?
>>
>> Tim
>>
>> On Fri, Jul 12, 2019, 5:05 PM COURTAULT Francois <
>> francois.courtault@thalesgroup.com> wrote:
>>
>>> Hello
>>>
>>> The question is in the subject.
>>> Is it possible to use JMX ? I have tried to find some counters without
>> any
>>> success :(
>>> Only:
>>>
>>> *         DequeueCount
>>>
>>> *         DispatchCount
>>>
>>> *         EnqueueCount
>>>
>>> *         ExpiredCount
>>>
>>> *         InFlightCount
>>>
>>> But no DelayedCount !
>>>
>>> Does JMS 2.0 API can be used  for delaying message (eg setDeliveryDelay
>>> method on a JMSProducer) ?
>>>
>>>
>>> Best Regards.
>>>
>>> ________________________________
>>> This message and any attachments are intended solely for the addressees
>>> and may contain confidential information. Any unauthorized use or
>>> disclosure, either whole or partial, is prohibited.
>>> E-mails are susceptible to alteration. Our company shall not be liable
>> for
>>> the message if altered, changed or falsified. If you are not the intended
>>> recipient of this message, please delete it and notify the sender.
>>> Although all reasonable efforts have been made to keep this transmission
>>> free from viruses, the sender will not be liable for damages caused by a
>>> transmitted virus.
>>>

-- 
Tim Bish


Re: Is there a way to monitor delayed message ?

Posted by Justin Bertram <jb...@apache.org>.
The names of the metrics he mentioned match those from 5.x and not Artemis
so I assume he's asking about 5.x.

However, it's worth noting that Artemis does track delayed/scheduled
messages using the ScheduledCount metric on the QueueControl MBean. I don't
see a way to do this in 5.x. Artemis also supports JMS 2.0 whereas 5.x
doesn't.


Justin

On Fri, Jul 12, 2019 at 9:25 PM Tim Bain <tb...@alumni.duke.edu> wrote:

> Is this question about 5.x or Artemis?
>
> Tim
>
> On Fri, Jul 12, 2019, 5:05 PM COURTAULT Francois <
> francois.courtault@thalesgroup.com> wrote:
>
> > Hello
> >
> > The question is in the subject.
> > Is it possible to use JMX ? I have tried to find some counters without
> any
> > success :(
> > Only:
> >
> > *         DequeueCount
> >
> > *         DispatchCount
> >
> > *         EnqueueCount
> >
> > *         ExpiredCount
> >
> > *         InFlightCount
> >
> > But no DelayedCount !
> >
> > Does JMS 2.0 API can be used  for delaying message (eg setDeliveryDelay
> > method on a JMSProducer) ?
> >
> >
> > Best Regards.
> >
> > ________________________________
> > This message and any attachments are intended solely for the addressees
> > and may contain confidential information. Any unauthorized use or
> > disclosure, either whole or partial, is prohibited.
> > E-mails are susceptible to alteration. Our company shall not be liable
> for
> > the message if altered, changed or falsified. If you are not the intended
> > recipient of this message, please delete it and notify the sender.
> > Although all reasonable efforts have been made to keep this transmission
> > free from viruses, the sender will not be liable for damages caused by a
> > transmitted virus.
> >
>

RE: Is there a way to monitor delayed message ?

Posted by COURTAULT Francois <fr...@thalesgroup.com>.
Hello,

These questions are for 5.x.
As 5.x doesn't support JMS 2.0, I think the answer to my 2nd question is no, right ?

But the most important question is: Is there a way to monitor delayed message (for 5.x) ?

Best regards.

-----Original Message-----
From: Tim Bain [mailto:tbain@alumni.duke.edu]
Sent: samedi 13 juillet 2019 04:26
To: ActiveMQ Users <us...@activemq.apache.org>
Subject: Re: Is there a way to monitor delayed message ?

Is this question about 5.x or Artemis?

Tim

On Fri, Jul 12, 2019, 5:05 PM COURTAULT Francois < francois.courtault@thalesgroup.com> wrote:

> Hello
>
> The question is in the subject.
> Is it possible to use JMX ? I have tried to find some counters without
> any success :(
> Only:
>
> *         DequeueCount
>
> *         DispatchCount
>
> *         EnqueueCount
>
> *         ExpiredCount
>
> *         InFlightCount
>
> But no DelayedCount !
>
> Does JMS 2.0 API can be used  for delaying message (eg
> setDeliveryDelay method on a JMSProducer) ?
>
>
> Best Regards.
>
> ________________________________
> This message and any attachments are intended solely for the
> addressees and may contain confidential information. Any unauthorized
> use or disclosure, either whole or partial, is prohibited.
> E-mails are susceptible to alteration. Our company shall not be liable
> for the message if altered, changed or falsified. If you are not the
> intended recipient of this message, please delete it and notify the sender.
> Although all reasonable efforts have been made to keep this
> transmission free from viruses, the sender will not be liable for
> damages caused by a transmitted virus.
>
________________________________
 This message and any attachments are intended solely for the addressees and may contain confidential information. Any unauthorized use or disclosure, either whole or partial, is prohibited.
E-mails are susceptible to alteration. Our company shall not be liable for the message if altered, changed or falsified. If you are not the intended recipient of this message, please delete it and notify the sender.
Although all reasonable efforts have been made to keep this transmission free from viruses, the sender will not be liable for damages caused by a transmitted virus.

Re: Is there a way to monitor delayed message ?

Posted by Tim Bain <tb...@alumni.duke.edu>.
Is this question about 5.x or Artemis?

Tim

On Fri, Jul 12, 2019, 5:05 PM COURTAULT Francois <
francois.courtault@thalesgroup.com> wrote:

> Hello
>
> The question is in the subject.
> Is it possible to use JMX ? I have tried to find some counters without any
> success :(
> Only:
>
> *         DequeueCount
>
> *         DispatchCount
>
> *         EnqueueCount
>
> *         ExpiredCount
>
> *         InFlightCount
>
> But no DelayedCount !
>
> Does JMS 2.0 API can be used  for delaying message (eg setDeliveryDelay
> method on a JMSProducer) ?
>
>
> Best Regards.
>
> ________________________________
> This message and any attachments are intended solely for the addressees
> and may contain confidential information. Any unauthorized use or
> disclosure, either whole or partial, is prohibited.
> E-mails are susceptible to alteration. Our company shall not be liable for
> the message if altered, changed or falsified. If you are not the intended
> recipient of this message, please delete it and notify the sender.
> Although all reasonable efforts have been made to keep this transmission
> free from viruses, the sender will not be liable for damages caused by a
> transmitted virus.
>