Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Paho » Testing MQTT for dot net sample from two windows computer
Testing MQTT for dot net sample from two windows computer [message #1840517] Sat, 17 April 2021 09:16 Go to next message
Mahbub Rahman is currently offline Mahbub RahmanFriend
Messages: 3
Registered: April 2021
Junior Member
I was testing a windows sample for MQTT found at hemelix automation/structured-text-mqtt/

The sample works fine on the same machine but if I try to run the same application from a different computer it does not work. The sample is using mosquitto as a broker.
Are there any settings that I should use so the client running on a different computer can receive the data?
Re: Testing MQTT for dot net sample from two windows computer [message #1840536 is a reply to message #1840517] Sun, 18 April 2021 08:50 Go to previous messageGo to next message
Ian Craggs is currently offline Ian CraggsFriend
Messages: 83
Registered: March 2013
Member
It might be this. Two applications connecting to the same broker must have different MQTT client ids. If they are the same, one will be kicked off when the other connects.
Re: Testing MQTT for dot net sample from two windows computer [message #1840537 is a reply to message #1840536] Sun, 18 April 2021 09:17 Go to previous messageGo to next message
Mahbub Rahman is currently offline Mahbub RahmanFriend
Messages: 3
Registered: April 2021
Junior Member
Hi,
Thank you for the response, it looks client id is different for each client
as it is generated by the GUID.
// use a unique id as client id, each time we start the application
clientId = Guid.NewGuid().ToString();
client.Connect(clientId);

Any further thoughts or options?
Since the last post was my first post, I could not show the source link, now I hope I can show it and that is https://www.hemelix.com/automation/structured-text-mqtt/
Re: Testing MQTT for dot net sample from two windows computer [message #1840538 is a reply to message #1840537] Sun, 18 April 2021 09:17 Go to previous message
Mahbub Rahman is currently offline Mahbub RahmanFriend
Messages: 3
Registered: April 2021
Junior Member
It works, there was some minor problem in the subscription part of the application.

[Updated on: Mon, 19 April 2021 12:21]

Report message to a moderator

Previous Topic:Java paho tls_set equivalent like in python
Next Topic:Problem connecting mqtt for smart watch
Goto Forum:
  


Current Time: Fri May 03 05:15:09 GMT 2024

Powered by FUDForum. Page generated in 0.03544 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top