You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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! :)
The text was updated successfully, but these errors were encountered:
I suggest we indeed introduce such a quiesceTimeout option on the AbstractMqttMessageDrivenChannelAdapter and use it, respectively, in that doStop() implementations.
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 inMqttPahoMessageDrivenChannelAdapter
. Therethis.client.disconnectForcibly(getDisconnectCompletionTimeout());
is called. In this overload the defaultQUIESCE_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! :)
The text was updated successfully, but these errors were encountered: