Skip to content

Adding Mqttv5PahoMessageDrivenChannelAdapter to running Mqttv5ClientManager #9368

Closed
@Ricore72

Description

@Ricore72

version 6.3.1

Description
I want to add multiple instances of Mqttv5PahoMessageDrivenChannelAdapter (on demand, when application is running) using already running client in Mqttv5ClientManager as constructor parameter. When I try, it does not work.
Cause seams to be MqttCallback:: connectComplete ,which sets the readyToSubscribeOnStart property.
That obviously cant trigger because client is already connected.

To Reproduce

  1. Create an instance of Mqttv5ClientManager
  2. Start clientManager
  3. create an instance of Mqttv5PahoMessageDrivenChannelAdapter with clientManager
  4. register adapter in IntegrationFlow using IntegrationFlowContext
  5. Try to send messages to it

Possible Fix
https://github.com/Ricore72/spring-integration
The fix does not work completely.

It only works if Handlers and adapters using same clientManager have the same Qos.

Note
I am not sure if this is the proper way to do this. This is my first issue to public project. So sorry if it is incorrect in any way.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions