You can turn on DEBUG logging for
org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolHandler to see
info about MQTT sessions being closed when a new session is created with
the same client ID. The logging will look something like this:

  Existing MQTT session from 192.168.10.1 closed due to incoming session
from 192.168.10.100 with the same client ID: myClientID

The broker does detect disorderly disconnects and you can use a server
plugin [1] and implement afterConnectionDestroyed [2]. However, there is no
way to distinguish orderly and disorderly disconnects.

I'd need more information about where you see dropped messages to comment
further on that.


Justin

[1]
https://activemq.apache.org/components/artemis/documentation/latest/broker-plugins.html#plugin-support
[2]
https://github.com/apache/activemq-artemis/blob/main/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/plugin/ActiveMQServerConnectionPlugin.java#L45

On Thu, Mar 28, 2024 at 9:38 AM William Crowell
<wcrow...@perforce.com.invalid> wrote:

> Justin,
>
> Yes, MQTT.
>
> I am talking about disorderly disconnects like client crash, network
> problem, etc.
>
> Regarding messages dropping…I am not exactly sure what they meant by
> that.  Maybe related to disorderly disconnects.
>
> Regards,
>
>
> Bill Crowell | Enterprise Architect, OpenLogic<
> https://www.openlogic.com/?utm_leadsource=email-signature&utm_source=outlook-direct-email&utm_medium=email&utm_campaign=2019-common&utm_content=email-signature-link
> >
> Perforce Software<
> http://www.perforce.com/?utm_leadsource=email-signature&utm_source=outlook-direct-email&utm_medium=email&utm_campaign=2019-common&utm_content=email-signature-link
> >
> P: +1 720 536 0699<tel:>
> Visit us on: LinkedIn<
> https://www.linkedin.com/company/perforce?utm_leadsource=email-signature&utm_source=outlook-direct-email&utm_medium=email&utm_campaign=2019-common&utm_content=email-signature-link>
> | Twitter<
> https://twitter.com/perforce?utm_leadsource=email-signature&utm_source=outlook-direct-email&utm_medium=email&utm_campaign=2019-common&utm_content=email-signature-link>
> | Facebook<
> https://www.facebook.com/perforce/?utm_leadsource=email-signature&utm_source=outlook-direct-email&utm_medium=email&utm_campaign=2019-common&utm_content=email-signature-link>
> | YouTube<
> https://www.youtube.com/user/perforcesoftware?utm_leadsource=email-signature&utm_source=outlook-direct-email&utm_medium=email&utm_campaign=2019-common&utm_content=email-signature-link
> >
>
>
> From: Justin Bertram <jbert...@apache.org>
> Date: Thursday, March 28, 2024 at 10:23 AM
> To: users@activemq.apache.org <users@activemq.apache.org>
> Subject: Re: Alerting on Duplicate Client IDs, Disconnects, Dropped
> Messages
> [You don't often get email from jbert...@apache.org. Learn why this is
> important at https://aka.ms/LearnAboutSenderIdentification ]
>
> 1) What protocol are you using for takeover with duplicate client IDs?
> MQTT?
>
> 2) Are you talking about orderly disconnects (e.g. a client calling close()
> on its connection) or disconnects caused by a client crash, network
> problem, etc.?
>
> 3) What do you mean by "dropped message" exactly?
>
>
> Justin
>
> On Thu, Mar 28, 2024 at 8:41 AM William Crowell
> <wcrow...@perforce.com.invalid> wrote:
>
> > Good morning,
> >
> > A few questions related to monitoring and alerts in Artemis:
> >
> > 1) Is there a way to identify duplicate client ids and when the broker
> > performs a disconnect based on client takeover?
> >
> > 2) Can Artemis detect disconnects from clients?  Is there a listener that
> > is available, or I can create to detect this?
> >
> > 3) Is there a way to detect dropped messages and why they were dropped?
> >
> > Anything available in JMX?
> >
> > Regards,
> >
> > William Crowell
> >
> >
> > This e-mail may contain information that is privileged or confidential.
> If
> > you are not the intended recipient, please delete the e-mail and any
> > attachments and notify us immediately.
> >
> >
>
>
> CAUTION: This email originated from outside of the organization. Do not
> click on links or open attachments unless you recognize the sender and know
> the content is safe.
>
>
> This e-mail may contain information that is privileged or confidential. If
> you are not the intended recipient, please delete the e-mail and any
> attachments and notify us immediately.
>
>

Reply via email to