Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mosquitto-dev] R: Single threaded bridge

Hi,

 

here in attach you can find a log and the configuration file I’m using.

 

Let me clarify the architecture for better comprehension of the logs:

·         mosquitto broker 1.4.14 launched as deamon with attached configuration and verbose mode

·         mosquitto_sub client subscribed to topic “power_manager/p/ignitionStatus”

·         custom application running a mosquito client (power_manager) publishing to topic “power_manager/p/ignitionStatus” every time the value of the hardware signal ignition changes (I make it toggle 1-0-1-0 ecc. around once per second)

 

In the logs you can see that there are two “holes” of about 20 seconds, when the bridge tries to connect to the remote broker, in which messages are not dispatched any more.

 

I think the issue is really the one pointed by Karl in the last email: https://github.com/eclipse/mosquitto/issues/41

 

I’m based on an embedded Linux distribution, based on kernel 3.10, with RT patch, running on an ARM core.

 

Thank you

Niccolò

 

Da: mosquitto-dev-bounces@xxxxxxxxxxx [mailto:mosquitto-dev-bounces@xxxxxxxxxxx] Per conto di jianhui zhan
Inviato: mercoledì 7 febbraio 2018 10:30
A: mosquitto-dev@xxxxxxxxxxx
Oggetto: Re: [mosquitto-dev] Single threaded bridge

 

 No, Mosquitto implemented with the asynchronous and non-blocking event drive behavior which means try to connect to the remote broker would never block local dispatches. I guess there's some errors else in your case. Do you have the log for further analyze?


From: mosquitto-dev-bounces@xxxxxxxxxxx <mosquitto-dev-bounces@xxxxxxxxxxx> on behalf of Niccolo Battezzati <niccolo.battezzati@xxxxxxxxxxxxxxx>
Sent: Wednesday, February 7, 2018 17:18
To:
mosquitto-dev@xxxxxxxxxxx
Subject: [mosquitto-dev] Single threaded bridge

 

Hi all,

 

I’m facing the following issue with the moquitto bridge functionality.

I have a mosquitto bridge that is working as a local broker (with clients on the same machine) and that bridges some topics to/from a remote broker.

However, if the bridge  cannot connect to the remote broker (indeed my operation environment cannot guarantee full internet connectivity always) it periodically hangs for about 30 seconds trying to connect and during this time it does not dispatch messages to the local clients any more. So, basically if the bridge cannot connect to the remote broker, even the local broker functionality is broken.

 

I guess the cause of this behavior is that there is only one thread that dispatches messages (local broker) and tries to connect to the remote broker (bridge), and, in my particular case, it remains stucked in the attempt of resolving the remote broker address.

 

Do you have any idea on ow to solve this problem? I would need that the local broker could continue to dispatch messages among local clients even if the bridge cannot communicate to the remote broker

 

Is there any branch or new version that could address this topic?

 

Thank you very much,

Niccolò


Back to the top