MQTT message taking very long

Hello, I would expect that mqtt is fast communication that saves battery rather than HA api. However, looking at the log (I have 3 sensors), it takes pretty long. First the state is sent:

Received 6:50:38 PM
QoS: 0
Payload: 3.51

Then other info:

Received 6:50:53 PM
QoS: 0
Payload:
Received 6:51:05 PM
QoS: 0
Payload:
Received 6:51:19 PM
QoS: 0
Payload:

From the log I can see that last message is sent 41 seconds after the first one. Is this necessary? If we want to optimize battery I would expect that mqtt should take 1 second as other Arduino sensors that I created.

Is there any way to strip out all unnecessary mqtt communication and send only state? Or may this be caused by mqtt broker? ESPhome sensor log says it actually takes one second…

There is a current problem with the mosquitto broker addon version 5.1.1, what are you running?

Yes I have version 5.1.1. I do not want to install the broker on different machine, because I would have to change all IPs in sensors. Is there anything that can be done with 5.1.1. add-on?

Impossible to say if it is the same problem when you give no logs.