Closed ricktauss closed 2 years ago
@ricktauss hello, TB edge and server MQTT broker is not a regular broker by design. Implementation based on netty MQTT framework with following most of the MQTT protocol design documents, but TB edge and server brokers are not providing regular publish/subscribe models. So you can't just subscribe to one topic and send the message to the same topic from another client and expect the result to arrive in the initial subscribed client. The possible subscribe / publish topics are available here: https://thingsboard.io/docs/reference/mqtt-api/
Please let me know if that answers your question.
@volodymyr-babak Is the topic fixed? In the documentation (https://thingsboard.io/docs/reference/mqtt-api/#subscribe-to-attribute-updates-from-the-server) there is explained that you can subscribe to the following topic: "v1/devices/me/attributes". I thought the topic is just a sample topic for documentation.
What i generally want to do is to measure the round trip time from device over tb-edge to tb-server. So i wanted to publish and subscribe with one client to any topic to mirror the message back. Maybe it is also better to make rule which mirros or publishes the message back to the client.
@ricktauss 'v1/devices/me/attributes' is a hardcoded topic name. You cannot subscribe to any topic, except the one, that is hardcoded. Here is the list of these topics: https://github.com/thingsboard/thingsboard/blob/master/common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/MqttTransportHandler.java#L606
Here is the steps that you should do in your test case:
@volodymyr-babak Ok if is hardcoded it is also fine. Thank you for the instruction!
Edge MQTT broker
Description Is it possible to publish and subscribe to the same topic with one client? The only possible topic for subscribing is following: v1/devices/me/attributes
If a message is sent to the topic, there is no reply also when subscribed.
What could be the problem here?