ARTEMIS-4750 AMQP Large Message flow control to use runAfter

The resume delivery on AMQP Large Message Writer is using runNow.
When a flow control is paused and then resumed, the runNow will make the first read to happen inline to the thread that's resuming other deliveries.
It would be better to not run the delivery within the same call. Hence the change here is simple, being just using a connection.runLater instead of runNow.
I have seen this on a thread dump from a production server.
No semantic issues were encountered but there was a theory that the Netty thread responsible to resume would be busy with a delivery when not supposed to.
Better to be safe on this case.
This commit is contained in:
Clebert Suconic 2024-04-25 11:25:37 -04:00
parent 817dc41ed4
commit 14e83faa1b
1 changed files with 1 additions and 1 deletions

View File

@ -166,7 +166,7 @@ public class AMQPLargeMessageWriter implements MessageWriter {
* Used to provide re-entry from the flow control executor when IO back-pressure has eased
*/
private void resume() {
connection.runNow(this::tryDelivering);
connection.runLater(this::tryDelivering);
}
private void tryDelivering() {