¿ªÔÆÌåÓý

Locked Re: MQTT high volume issues - some progress #mqtt


 

Thanks all? - this is a fairly minor issue for me and it seems that nobody else is experiencing it so please prioritise it accordingly!
?
The only other thing I've noticed, that I can add if it helps - and again it's a very, very minor issue that I've worked around -
?
I have a couple of Windows applications that are running some automation and monitoring for me. As part of what they do, they very regularly 'allocate' blocks within JMRI. For each block they want to allocate, they send a small json payload to the json server, for a single block, containing a string value for the 'value' field, to indicate allocation. Additionally, they send an MQTT publish which JMRI / LogixNG pick up, and that takes care of setting the alternate block colour on the panel. Sometimes there are multi block sections, so 5-6 blocks can be processed pretty much at the same time, resulting in 5-6 json POSTs and 5-6 MQTT publishes.
?
For the POSTs, they all worked every time. But MQTT didn't. If, say 6 blocks needed to be allocated,. they would all get their value, but, say only 4 would get their alternate colour set. It's like it doesn't cope with multiple messages at the same time. I could see the MQTT publishes were successful, but couldn't see anything in the JMRI logs, it was like they just got completely missed. I switched to queueing up the MQTT publishes in the app and sending them maybe 200ms apart, and that worked flawlessly.
?
This was before I upgraded JMRI to the new version that handled more concurrent messages, but still, even when I was experiencing the issue it was when I was debugging software without the actual layout being powered up, so it was max 10 publishes at the same time.
?
I think a way of recreating this - and I'll get onto this today, is to just write a 'for' loop, send multiple messages to MQTT on a subject that JMRI is subscribed to, and see how many it takes before some start getting missed. I'll report back if I find anything useful.
?
Chris

Join [email protected] to automatically receive all group messages.