MaxInflight not adhered in RabbitMQ [message #1871769] |
Wed, 09 October 2024 06:33  |
Eclipse User |
|
|
|
Hi,
I am using the org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.5 java mqtt client towards RabbitMQ 3.12.10 with the mqtt plugin enabled.
Everything works as expected except that now I have switched to manual acknowledgement and receives only 10 messages (want to recieve 100) by the client until the client acknowledged the recieved messages.
I have tried to configure the client with a higher and lower MaxInflight value without any effect. When I look in the admin console of the RabbitMQ the "mqtt"-consumer always have Prefetch count of 10.
When I configure max inflight to 3, then I would have expected to receive 3 messages and then I would not recieve more until the client had
acknowledged those 3 messages, but I receive 10 messages?
I have configured the client as follows:
mqttClient = new MqttClient(mqttConfig.serverUri, mqttConfig.clientId)
mqttClient.setManualAcks(true) // allows later acknowledge
val connectionOptions: MqttConnectOptions = new MqttConnectOptions()
connectionOptions.setCleanSession(false)
connectionOptions.setAutomaticReconnect(true)
connectionOptions.setUserName("bridge")
connectionOptions.setPassword(mqttConfig.password.toCharArray)
connectionOptions.setMaxInflight(3)
mqttClient.setCallback(new MyCompanyMqttCallback("mytopic"))
mqttClient.connect(connectionOptions) // The callback subscribes when connected (mqttClient.subscribe("mytopic"))
mqttClient.getDebug.dumpClientState()
And the debug client state is
2024-10-09 08:03:42,784 FINE [org.ecl.pah.cli.mqt.int.ClientComms] (I/O dispatcher 1) bridge:
============== bridge : ClientState ==============
quiescing : false
In use msgids : {}
lastInboundActivity : 630529889692000
inFlightPubRels : 0
pendingFlows : []
outboundQoS2 : {}
pingoutstanding : 0
outboundQoS1 : {}
outboundQoS0 : {}
lastOutboundActivity : 630529696067600
nextMsgID : 1
maxInflight : 3
inboundQoS2 : {}
pendingMessages : []
tokens :
actualInFlight : 0
==========================================
Any ideas about how I can get further information about why the max inflight settings has no effect in my scenario?
Thanks in advance for any input.
Best regards Trym
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03800 seconds