frankframework icon indicating copy to clipboard operation
frankframework copied to clipboard

MqttSenders and MqttListeners do not share a common MQTT client resulting in disconnect and reconnect loops when using the same clienId

Open MLenterman opened this issue 1 year ago • 0 comments

❗ please do not add sensitive information in issues, you can provide extra information via email using issue number as reference ❗

Describe the issue With MQTT a clientId is supposed to represent a device or client application and should only connect to the broker with 1 clientId. Currently a new MQTT (Java)client is being instantiated for each instance of MqttSender and MqttListener. This will result in the broker disconnecting the first MQTT client because a connection with the same clientId is already connected. Then the framework sees that the connection is lost and tries to reconnect to the broker, repeating this back-and-forth disconnect and reconnect in a endless loop.

Currently the developer is limited to only using a single MqttSender or MqttListener, or needs to use a unique clientId for each one of them. The latter is unpractical in any production setup because ACL's and credentials need to be configured on the broker for each clientId.

Reporter M. Lenterman

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Screenshots If applicable, add screenshots to help explain your problem.

Configuration

Please provide the configuration of the Pipe or Receiver with the problem.

Input

Please provide an example of the input message. 
Alternatively, provide a Ladybug report.

Environment

FF! 8.1.0-RC2-20240411.160355: Openforms2bpel 1.16.2
Running on ae6a4a7c57c9 using Apache Tomcat/9.0.87
Java Version: OpenJDK Runtime Environment (17.0.10+7)
Heap size: 388M, total JVM memory: 592M
Free disk space: 194GB, total disk space: 251GB
Up since: 2024-04-11 18:07:56 (17h) 

Additional Environment

  • DBMS: [e.g. Oracle, MSSQL, MariaDB, MySql, PostgreSQL]
  • Browser: [e.g. Chrome, Safari, Edge, Firefox]

Additional Context Add any other context about the problem here. (f.e. ladybug report / test adapter with larva test)

MLenterman avatar Apr 12 '24 09:04 MLenterman