I work on C and java SDK. I'm trying to use the examples(SteamSensor) to understand how work the SDK.
I start up SteamSensor and after few second I stop tomcat. I was thinking that data will be saved locally and when tomcat restart, all saved data are pushed. But it doesn't work.
So I want to know if provided examples need more configuration for this or if it's an issue with the SDK.
Here's the information I found page 23 of the Thingworx C SDK Developer's guide:
Handling Offline Messages
The C SDK has multiple options for offline message storage. Offline message
storage will queue up outgoing request messages for later delivery if the network
is down or the duty cycle modulation component of the AlwaysOn protocol
happens to be in the “off” state. If OFFLINE_MSG_STORE is not defined or set
to 0, outbound messages are not queued at all. If OFFLINE_MSG_STORE is set
to 1, messages will be queued up in RAM, up to a limit of OFFLINE_MSG_
QUEUE_SIZE as defined in src/config/twDefaultSettings.h. When
connectivity is re-established, all the messages in this queue will be sent out to the
Thanks for the answer and guide http://support.ptc.com/WCMS/files/166920/en/ThingWorx_C_SDK_Developer_Guide_v1.2.pdf.
I've set this #define and I encountered a probleme with "stream data" on Thingworx (to save data changes) : it's not working. With a "valuestream" it works better and it send the offline queue content when the connection is back.
Unfortunately, data sent between the time the server is off and the time the SDK detect it are lost. It looks like those data are not added to the queue.
I reduced ping rate time and pong to detect quickly the unavailable server to limite lost data. Do you know if there is a better solution ?