- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.1k
 
Description
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! :)