Skip to content

MQTT integration: Possiblity to set the consumerStopAction when using a ClientManager #4002

Closed
@t-lintanf

Description

@t-lintanf

Expected Behavior
In the MQTT integration when using a client manager, I need to be able to set the ConsumerStopAction. This could be achieved by adding a constructor with the possibility to provide both a ClientManager and a MqttPahoClientFactory.

Current Behavior
The ConsumerStopAction are defined on the MqttPahoClientFactory which is private. It is not possible to define the value when using a ClientManager. As it use a DefaultMqttPahoClientFactory which set it to UNSUBSCRIBE_CLEAN.

Context
I need to be able to have the messages queue up in the broker while the spring boot application restart for maintenance purposes. And i also can only use one client but I need several channelAdaptors. Currently restarting the spring application causes the loss of message that are critical for my use case.

A possible alternative would be to make a custom channelAdaptor but I feel it would be appropriate to implement it on the base class. I am willing to submit a pull request to implement those changes if they are approved.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions