0

With the version 1.4.14 i found that when :

  1. plugged ethernet cable ( between embedded device and pc ) no need for internet or any connectivity just plugged in the ethernet cable.

  2. run mosquitto localy and in loopback :

    • mosquitto with the default config : mosquitto -c /etc/mosquitto/mosquitto.conf -v -d
    • mosquitto_sub -h localhost -t topic/message &
    • mosquitto_pub -h localhost -m "hello" -t topic/message -d
  3. Unplugged the ethernet

Result : messages are buffered only when the ethernet is plugged.

if i unplugged the ethernet messages are not buffered As soon as I plugged in the ethernet again, the messages are sent all at once.

When i check the mosquitto log I found that the client use the IP of ethernet interface.

I tested with 1.5.8 version the problem is not seen, because they use the right interface( loopback interface).

which commit that fix this issue ? (I need to fix this issue in this version )

hardillb
  • 54,545
  • 11
  • 67
  • 105
  • It's really not clear from this version question where mosquitto is running, if it's not on the "device" but on a pc, then it REALLY isn't clear why you can't use a newer version. – hardillb Mar 29 '23 at 16:06
  • Mosquitto running in the device. We must fix this issue in the current version – HAMZA SAAFI Mar 30 '23 at 07:54

1 Answers1

1

If the problem is fixed in a later version then the solution is to use the later version, it's most likely a bug in the code, and there will be no configuration workaround.

At best you could do a binary search of all the versions between the broken and working version and then try an identify the fix and back port on top of 1.4.14, but you are still going to need to rebuild and distribute it. But you can't expect others to do the work (for free) to search out the exact code change for this for you, all the code is available on GitHub and as downloadable tgz from the mosquitto website.

You've not explained why you say you are pinned to this really old version, I'm guessing because it's baked into an existing firmware image, if that's the case then you really should consider deploying a new image. There a LARGE number of other reasons to upgrade, new feature (MQTT v5 support) and lots of bug fixes and probably security fixes.

hardillb
  • 54,545
  • 11
  • 67
  • 105