Hi all, I'd like to start a conversation for AMQ-8306<https://issues.apache.org/jira/browse/AMQ-8306>.
I have talked to some of the community members and the suggestion was to use a thread safe list and synchronized keyword. It does resolve the issue we have but I hesitated on submitting the fix because this could be a change of behaviour on other customer managed plugins. The fix using synchronized keyword requires the plugins to always call “service.start()” in the plugin code and requires the implementation of the “start()” method to always be "multi-start()-safe". Right now there's only one plugin in the Active MQ code base that may hit this race condition problem, but I don't know 1). if there will be more; 2). if any existing users have their own plugins that may have used the same pattern. We are still discussing the potential solutions but we'd also like to have this conversation within the Apache Active MQ community for a greater audience on: 1. Whether there are users that implemented custom plugins with the same pattern as in MQTTPacketIdGenerator<https://github.com/apache/activemq/blob/activemq-5.15.15/activemq-mqtt/src/main/java/org/apache/activemq/transport/mqtt/MQTTPacketIdGenerator.java#L107>. 2. If there’s another solution to solve this issue with minimal behavioural impact Thanks in advance. Regards, Xinjing Wei