Rest client subscriber
we have serious problem and need help.
we are familiar
with rest api of backendless to be subscriber in a channel with specific
subtopic. in android we did following steps and get exactly what i
1. Subscribe to non-default channel. Request: POST .../messaging/channel_name/subscribe.
2. Here I get subscription Id.
3. Post some messages to channel through Messaging console.
4. Run request GET .../messaging/channel_name/<subscriptionId>
5. On the last step I receive a list of messages, just as expected.
About 1 minute later, when my message gone from channel and no message
exists in channel, i send another message, immediately receive last
7. every things is ok, every time we send new
message get it in android app as we expected without send GET request
problem is here....
we did every
things like above with prepared rest api from backendless to get
messages from channel in rest client(WIFI Arduino ESP8266) and get
responses as above, but there is a problem.
when client receive
first list of messages, then we send socond message and client receive
nothing unless we send Get request (step 4) again and again. means for
every message we need send GET request(GET
we try a
solution and it works. put GET request in a loop, so request runs over
and over again, this approach waste either our local sources (Battery
and ....) and server resources(get maximum api/min).
i hope send you enough detail, please tell us what is the right solution.
thanks for your help.