Skip to content

MQTT: Configure quiesceTimeout in disconnectForcibly() #10095

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
artembilan opened this issue Jun 10, 2025 · 1 comment
Open

MQTT: Configure quiesceTimeout in disconnectForcibly() #10095

artembilan opened this issue Jun 10, 2025 · 1 comment
Labels
Milestone

Comments

@artembilan
Copy link
Member

Discussed in #10093

Originally posted by leonard2901 June 10, 2025
Hello,
I use spring-integration-mqtt (phao3) to communicate with a Mosquitto instance. For integration testing, I start Mosquitto using Testcontainers.

This generally works fine, but the tests encounter a 30-second timeout when the client attempts to disconnect, as the container has already been stopped. I have looked through the code, especially the doStop() method in MqttPahoMessageDrivenChannelAdapter. There this.client.disconnectForcibly(getDisconnectCompletionTimeout()); is called. In this overload the default QUIESCE_TIMEOUT of 30 seconds is used.

In my tests I would like to just disconnect immediately and discard any potentially pending messages.

Is there a way to configure the quiesceTimeout or any other way to disconnect without a timeout?

Any help is appreciated! :)

@artembilan artembilan added this to the 7.0.0-M1 milestone Jun 10, 2025
@artembilan
Copy link
Member Author

I suggest we indeed introduce such a quiesceTimeout option on the AbstractMqttMessageDrivenChannelAdapter and use it, respectively, in that doStop() implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant