Messages not delivered.

I’m checking out Backendless’ subscriber messaging. I’ve created a sendMessages() method that publishes 10 messages … about one every 1/2 second. These messages are received by my second device.I then sent my 10 messages again, but with my second device turned off. Upon opening up my text app the 10 messages were received. Cool.So i turn off my second device again. Send 10 messages. Wait a few minutes and send 10 more messages. When i turn on and open my test app on my second device only the last 10 messages were received. Does your messaging service have some limited amount of time to receive messages?
Below is the code that i’m using.
private void sendMessages() {

if (MESSAGE_CHANNEL.equals(MySettings.NOT_AVAILABLE)) {
    MyLog.e("MainActivity", "sendMessages(): Unable to send messages. Message Channel is not available.");
    return;
}

String tableName = "SampleTable";
String mAction = "3";
for (int i = 1; i < 11; i++) {
    MessagePayload messagePayload = new MessagePayload(mAction, tableName, UUID.randomUUID().toString());

    Backendless.Messaging.publish(MESSAGE_CHANNEL, messagePayload.toCsvString(), new AsyncCallback&lt;MessageStatus&gt;() {
        @Override
        public void handleResponse(MessageStatus messageStatus) {
            MyLog.i("MainActivity", "sendMessages(): Message published - " + messageStatus.getMessageId());
        }

        @Override
        public void handleFault(BackendlessFault backendlessFault) {
            MyLog.e("MainActivity", "sendMessages(): BackendlessFault: " + backendlessFault.getMessage());
        }
    });

    try {
        Thread.sleep(500);
    } catch (InterruptedException e) {
        MyLog.e("MainActivity", "sendMessages(): InterruptedException: " + e.getMessage());
    }
}

}

Backendless.Messaging.subscribe(MESSAGE_CHANNEL,
new AsyncCallback<List<Message>>() {
@Override
public void handleResponse(List<Message> response) {
for (Message message : response) {
String csvDataString = message.getData().toString();
MessagePayload payload = new MessagePayload(csvDataString);
tvMessagesReceived.setText(tvMessagesReceived.getText() + “\n\n” + payload.toString());
}
}

        @Override
        public void handleFault(BackendlessFault fault) {
            MyLog.e("MainActivity", "Backendless.Messaging.subscribe()MessageCallback: BackendlessFault: " + fault.getMessage());
        }
    }, new AsyncCallback&lt;Subscription&gt;() {

        @Override
        public void handleResponse(Subscription response) {
            MyLog.i("MainActivity", "Backendless.Messaging.subscribe()SubscriptionCallback: response");
            subscription = response;
        }

        @Override
        public void handleFault(BackendlessFault fault) {
            MyLog.e("MainActivity", "Backendless.Messaging.subscribe()SubscriptionCallback: BackendlessFault: " + fault.getMessage());

        }
    }

);

Publish/Subscribe messages are not held by server for the clients. If a client (subscriber) is offline and does not grab the messages within 1 minute after they are sent, the messages are deleted.

We are about to introduce a new feature which will use push notifications as the mechanism for message delivery. That will help in avoiding the behavior you are seeing.

Regards,
Mark

Mark, is your upcoming feature aware of delivery state? Dies the Server know if the client gut the messages?

No, our messaging does not provide the “guaranteed delivery” feature.

Regards,
Mark

Is this feature available now?