IPVS-AS / MBP

A management platform for IoT environments and applications
Other
23 stars 14 forks source link

Allow more simultaneous MQTT publishments #637

Open schneiti opened 2 years ago

schneiti commented 2 years ago

If the MBP performs many publishments within a short period of time a MQTT exception is thrown which prevents the MBP of sending anything to any actuator. Here, a better publishing mechanism would make sense which protects the MBP to publish too exessively.

Alternatively one could think of setting the number of allowed inflight messages for the paho client higher: See https://stackoverflow.com/questions/38751546/send-many-publish-message-too-many-publishes-in-progress-error

MqttException: Too many publishes in progress

Too many publishes in progress (32202)

at org.eclipse.paho.client.mqttv3.internal.ClientState.send(ClientState.java:527)

at org.eclipse.paho.client.mqttv3.internal.ClientComms.internalSend(ClientComms.java:163)

at org.eclipse.paho.client.mqttv3.internal.ClientComms.sendNoWait(ClientComms.java:193)

at org.eclipse.paho.client.mqttv3.MqttAsyncClient.publish(MqttAsyncClient.java:1375)

at org.eclipse.paho.client.mqttv3.MqttClient.publish(MqttClient.java:570)

at de.ipvs.as.mbp.service.messaging.impl.mqtt.MQTTClientConnector.publish(MQTTClientConnector.java:191)

at de.ipvs.as.mbp.service.messaging.PubSubService.publish(PubSubService.java:126)

at de.ipvs.as.mbp.service.rules.execution.actuator_action.ActuatorActionExecutor.execute(ActuatorActionExecutor.java:160)

at de.ipvs.as.mbp.service.rules.RuleExecutor.executeRule(RuleExecutor.java:73)

at de.ipvs.as.mbp.service.rules.RuleEngine.induceRuleExecution(RuleEngine.java:192)

at de.ipvs.as.mbp.service.cep.trigger.CEPTriggerService.lambda$registerTrigger$0(CEPTriggerService.java:87)

at de.ipvs.as.mbp.service.cep.engine.esper.EsperCEPQueryDispatcher.lambda$update$0(EsperCEPQueryDispatcher.java:36)

at java.base/java.lang.Thread.run(Unknown Source)
schneiti commented 2 years ago

Also it seems that unnecessarily many reconnects are performed. grafik