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

Implement idempotent REST publishing #435

Merged
merged 2 commits into from
Dec 6, 2018
Merged

Conversation

paddybyers
Copy link
Member

@paddybyers paddybyers commented Nov 19, 2018

This implements optional idempotent REST publishing as specified in https://docs.ably.io/client-lib-development-guide/features/#RSL1k:

(RSL1k) Idempotent publishing via REST is supported by populating the id attribute of Message instances passed to publish():
(RSL1k1) Idempotent publishing via library-generated Message ids is supported if idempotentRestPublishing (see TO3n) is enabled and one or more Message instances are passed to publish() and all Messages have an empty id attribute. The library generates a base id string by base64-encoding a sequence of at least 9 bytes obtained from a source of randomness. Each individual Message in the set of messages to be published is assigned a unique id of the form <base id>:<serial> (where serial is the zero-based index into the set).
(RSL1k2) Idempotent publishing via client-supplied Message ids is supported where a single Message is passed to publish() and it contains a non-empty id. The id is preserved on sending the message.

Prior to the 1.2 release, idempotent publishing via a library-generated id is disabled by default, but can be enabled via the idempotentRestPublishingclient option (TO3n).

@paddybyers paddybyers force-pushed the idempotent-rest-publish branch from b0d68c6 to 4873256 Compare December 6, 2018 16:56
@paddybyers paddybyers merged commit 0dc44fb into develop Dec 6, 2018
@KacperKluka KacperKluka deleted the idempotent-rest-publish branch March 25, 2022 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant