Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: Publishing fails silently when client is reconnecting and #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sunilpalacherla
Copy link

offline queues are disabled.
Fix: Allow application to handle republishing of failed messages OR
enable offline queues by throwing an exception under these conditions.

offline queues are disabled.
Fix: Allow application to handle republishing of failed messages OR
enable offline queues by throwing an exception under these conditions.
@sunilpalacherla sunilpalacherla changed the title Problem: Publishing silently fails when client is reconnecting and Problem: Publishing fails silently when client is reconnecting and Mar 22, 2018
@@ -1174,6 +1174,8 @@ public void publishData(byte[] data, String topic, AWSIotMqttQos qos,
AWSIotMqttMessageDeliveryCallback.MessageDeliveryStatus.Fail,
userData);
}
} else {
throw new AmazonClientException("Client is reconnecting and publishing from offline queue is disabled.");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This covers the case where a message is dropped where offlinePublishQueueEnabled is false.

What do you think about line 1171? It seems that putMessageInQueue, could return true and drop a message if fullQueueKeepsOldest is false. It seems it will drop the oldest message silently and return true. Perhaps this does not affect our use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants