Riccardo, Thank you! ________________________________ From: Modanese, Riccardo <riccardo.modan...@eurotech.com.INVALID> Sent: Thursday, March 28, 2024 12:11:05 PM 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 riccardo.modan...@eurotech.com.invalid. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] Hi, could be a little bit OT but, for our use case, we implemented a custom SecurityPlugin (and a custom ServerPlugin also) to detect and manage stealing link on MQTT connector. If you want to take a look the code is here: https://github.com/eclipse/kapua/blob/develop/broker/artemis/plugin/src/main/java/org/eclipse/kapua/broker/artemis/plugin/security/SecurityPlugin.java (and you find bugs plese tell me!) Riccardo From: Justin Bertram <jbert...@apache.org> Date: Thursday, 28 March 2024 at 17:02 To: users@activemq.apache.org <users@activemq.apache.org> Subject: Re: Alerting on Duplicate Client IDs, Disconnects, Dropped Messages 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://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Factivemq.apache.org%2Fcomponents%2Fartemis%2Fdocumentation%2Flatest%2Fbroker-plugins.html%23plugin-support&data=05%7C02%7CWCrowell%40perforce.com%7C5debe4d355894b44444c08dc4f41b7df%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C638472390890535622%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=e2ezlbgO4tSzL1%2BV%2B8t3UYD%2F%2F4qrxaPkg4jYQ%2BQ%2Funs%3D&reserved=0<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://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.openlogic.com%2F%3Futm_leadsource%3Demail-signature%26utm_source%3Doutlook-direct-email%26utm_medium%3Demail%26utm_campaign%3D2019-common%26utm_content%3Demail-signature-link&data=05%7C02%7CWCrowell%40perforce.com%7C5debe4d355894b44444c08dc4f41b7df%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C638472390890543586%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=72OooGEcVERnupgoEodvv17RmRo6yDDxySSU9pRBcIw%3D&reserved=0<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://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fperforce%3Futm_leadsource%3Demail-signature%26utm_source%3Doutlook-direct-email%26utm_medium%3Demail%26utm_campaign%3D2019-common%26utm_content%3Demail-signature-link&data=05%7C02%7CWCrowell%40perforce.com%7C5debe4d355894b44444c08dc4f41b7df%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C638472390890547234%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=ZW%2FJauBLpzd93nOr%2FwYn72qTcUMb5QByCD6fMC6KdRw%3D&reserved=0><https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fperforce%3Futm_leadsource%3Demail-signature%26utm_source%3Doutlook-direct-email%26utm_medium%3Demail%26utm_campaign%3D2019-common%26utm_content%3Demail-signature-link%253e&data=05%7C02%7CWCrowell%40perforce.com%7C5debe4d355894b44444c08dc4f41b7df%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C638472390890550772%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=X%2BTtSXDiRPzU%2BATJ9lxq6VkTJYEMpRFx5lMe7kTrqrI%3D&reserved=0><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://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitter.com%2Fperforce%3Futm_leadsource%3Demail-signature%26utm_source%3Doutlook-direct-email%26utm_medium%3Demail%26utm_campaign%3D2019-common%26utm_content%3Demail-signature-link&data=05%7C02%7CWCrowell%40perforce.com%7C5debe4d355894b44444c08dc4f41b7df%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C638472390890554629%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=9P%2F7QXiYoiro6VhRutSh4iYeIuqQIWw7OBlrXD2v4yU%3D&reserved=0><https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitter.com%2Fperforce%3Futm_leadsource%3Demail-signature%26utm_source%3Doutlook-direct-email%26utm_medium%3Demail%26utm_campaign%3D2019-common%26utm_content%3Demail-signature-link%253e&data=05%7C02%7CWCrowell%40perforce.com%7C5debe4d355894b44444c08dc4f41b7df%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C638472390890559186%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=twneVoH2Q%2BaE9983S8a8%2F3htystqKHkzGEICx%2FQ5fuk%3D&reserved=0><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://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.facebook.com%2Fperforce%2F%3Futm_leadsource%3Demail-signature%26utm_source%3Doutlook-direct-email%26utm_medium%3Demail%26utm_campaign%3D2019-common%26utm_content%3Demail-signature-link&data=05%7C02%7CWCrowell%40perforce.com%7C5debe4d355894b44444c08dc4f41b7df%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C638472390890563028%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=3Lzoufk9VMF3Me9iGRd9G2tIUHbXvVSFLXB6bXrxrR8%3D&reserved=0><https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.facebook.com%2Fperforce%2F%3Futm_leadsource%3Demail-signature%26utm_source%3Doutlook-direct-email%26utm_medium%3Demail%26utm_campaign%3D2019-common%26utm_content%3Demail-signature-link%253e&data=05%7C02%7CWCrowell%40perforce.com%7C5debe4d355894b44444c08dc4f41b7df%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C638472390890906229%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=Gzz%2FU%2B0GElSAEn29w0aQPdzNWdJSvX2jr3bd%2BCBAOpc%3D&reserved=0><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://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.youtube.com%2Fuser%2Fperforcesoftware%3Futm_leadsource%3Demail-signature%26utm_source%3Doutlook-direct-email%26utm_medium%3Demail%26utm_campaign%3D2019-common%26utm_content%3Demail-signature-link&data=05%7C02%7CWCrowell%40perforce.com%7C5debe4d355894b44444c08dc4f41b7df%7C95b666d19a7549ab95a38969fbcdc08c%7C0%7C0%7C638472390890912587%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=0mIWr9Sj7BoRdI%2F8PXavWyfazFfkCefN3eeXAgmmoeA%3D&reserved=0<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. > > 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.