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

Effectively-Once support for WebSockets #8175

Closed
cvuijst opened this issue Oct 1, 2020 · 2 comments
Closed

Effectively-Once support for WebSockets #8175

cvuijst opened this issue Oct 1, 2020 · 2 comments
Labels
type/feature The PR added a new feature or issue requested a new feature

Comments

@cvuijst
Copy link

cvuijst commented Oct 1, 2020

Is your feature request related to a problem? Please describe.
On the Pulsar client feature matrix, the "Effectively-Once" feature is not available for the WebSocket client. The matrix seems currently updated till Pulsar 2.5.0, see here. Is there any chance this will be supported in the future? Or does anyone have experience how to make this happen in a different way?

Describe the solution you'd like
Solution preferred to be embedded through the Pulsar WebSocket server.

Describe alternatives you've considered
Alternatives might be:

  • Enhance the messages send and acknowledges received to impose effectively once tracking at the client side.
  • Enhance documentation how this can be achieved in another way outside the Pulsar scope. For example, an end to end scenario that proves effectively once based on WebSocket integration.

Additional context
This issue is created as follow up on the Pulsar Slack Channel # general, message: https://apache-pulsar.slack.com/archives/C5Z4T36F7/p1601446017085700

@BewareMyPower
Copy link
Contributor

The WebSocket already supports effectively-once because the client side only needs to set producer name and timeout, i.e. sendTimeoutMillis and producerName. See http://pulsar.apache.org/docs/en/client-libraries-websocket/#producer-endpoint for details.

The effectively-once means message deduplication from producer side, see http://pulsar.apache.org/docs/en/cookbooks-deduplication/#pulsar-clients

And the equivalent Python code through WebSocket is:

import websocket

url = 'ws://localhost:8080/ws/v2/producer/persistent/public/default/topic-1?producerName=producer-1&sendTimeoutMillis=0'
ws = websocket.create_connection(url)

It should be supported a long time ago but the client feature matrix in wiki was wrong.

@cvuijst
Copy link
Author

cvuijst commented Dec 1, 2020

Sounds like a solution, thank you for the additional description.

@cvuijst cvuijst closed this as completed Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/feature The PR added a new feature or issue requested a new feature
Projects
None yet
Development

No branches or pull requests

3 participants