Java Client SDK can't get response after sending live message to Device #1242
-
my environment:java client sdk ---- Ditto ----- MQTT broker ------ Device my problem:i used java sdk to send live message API to device, and i saw Device received the ditto protocol message, and then Device modified the message content
mqtt connection configurationMy SDK API demo codesthe output print codes was not executed, as i did not see the print info Message from MQTT (mosquitto)message1(Device received) message2(Device sent as response) some logs (from ditto-gateway)dead letters encountered So here, i have some questions:
thanks a lot! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
|
@yuguanxiang could you please try to send the following response instead (all other fields are not necessary and may even disturb the processing - just to rule that possibility out): {
"topic": "my.test/thing3/things/live/messages/TO--hello.world",
"headers": {
"version": 2,
"correlation-id": "3711d8da-7677-491b-bffc-592f8a628b37",
"content-type": "text/plain"
},
"value": "I am a TeapotX",
"status": 200,
"path": "/outbox/messages/TO--hello.world"
} |
Beta Was this translation helpful? Give feedback.
-
thanks for your quick reply, i've tried , but it seems still get no response |
Beta Was this translation helpful? Give feedback.
-
|
Ok, so to which address do you send the response via MQTT? For your questions:
I hope that helps .. |
Beta Was this translation helpful? Give feedback.
Ok, so to which address do you send the response via MQTT?
I guess to something like
my.test/<something>because that is the only "source" address you configure.For your questions:
client.live().startConsumption().toCompletableFuture().get();- I think without that you won't receive live messages with the clienttimeoutmethod: