Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Kura » Where the MQTT messages has been decoded using the google protobuf?
Where the MQTT messages has been decoded using the google protobuf? [message #1768676] Fri, 21 July 2017 10:23 Go to next message
Sabrina anirbas is currently offline Sabrina anirbasFriend
Messages: 45
Registered: April 2015
Member
Hello,

I came accross this thread discussing the fact that the CloudService decode the MQTT message following google protobuf.

What I did not understand is where this message has been decoded. I have used the cloud service to send MQTT messages and I received the MQTT message via a normal MQTT client without the need to decod it following the google format.

It is confusing to me since I dont understand where the message has been decoded.

Any idea?

Thanks!

[Updated on: Fri, 21 July 2017 10:24]

Report message to a moderator

Re: Where the MQTT messages has been decoded using the google protobuf? [message #1768712 is a reply to message #1768676] Fri, 21 July 2017 22:29 Go to previous message
David Woodard is currently offline David WoodardFriend
Messages: 420
Registered: July 2014
Senior Member
Hello,

If you are using the CloudService of Kura to send/receive messages, you do not need to worry about Google Protobuf. The framework handles the encoding/decoding for you. The classes that handles this can be reviewed here [1][2].

I am not sure I understand your statement about a normal MQTT client. If you send a message with the Kura CloudService, and you receive that message with a non-Kura MQTT client (i.e. stand alone Paho client), you will need to decode the message yourself. If you are not decoding the message with the "normal MQTT client", then you are not using the Kura CloudService. There are other levels of transport within Kura, namely the DataService. If you are using the DataService, then messages are not encoded with Google Protobuf, and you don't need to worry about decoding .

One other note, the latest version of Kura (v3.0.0) introduced simple JSON formats to the CloudService. If you are using this, then you also don't need to worry about decoding the message. This is not the default setting of Kura, but can be enabled if desired.

[1] https://github.com/eclipse/kura/blob/develop/kura/org.eclipse.kura.core.cloud/src/main/java/org/eclipse/kura/core/cloud/CloudPayloadProtoBufDecoderImpl.java
[2] https://github.com/eclipse/kura/blob/develop/kura/org.eclipse.kura.core.cloud/src/main/java/org/eclipse/kura/core/cloud/CloudPayloadProtoBufEncoderImpl.java

Thanks,
--Dave
Previous Topic:Access kura embedded DB from console
Next Topic:MQTT and demo heater
Goto Forum:
  


Current Time: Fri Nov 16 21:54:55 GMT 2018

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

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

Back to the top