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

Websocket dead letter topic (PIP22) #2968

Merged
merged 2 commits into from Nov 9, 2018
Merged

Websocket dead letter topic (PIP22) #2968

merged 2 commits into from Nov 9, 2018

Conversation

cbornet
Copy link
Contributor

@cbornet cbornet commented Nov 9, 2018

Motivation

PIP22 Dead Letter Topic is available in Java client but not in WebSocket proxy.

Modifications

Added two query params maxRedeliverCount and deadLetterTopic to the WebSocket handler to be able to set the ConsumerBuilder's DeadLetterPolicy.

Result

Dead Letter Topic can be used with WebSockets.
Example request:

curl --include \
     --no-buffer \
     --header "Connection: Upgrade" \
     --header "Upgrade: websocket" \
     --header "Host: example.com:80" \
     --header "Origin: http://example.com:80" \
     --header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
     --header "Sec-WebSocket-Version: 13" \
"http://localhost:8080/ws/v2/consumer/persistent/public/default/my-topic/my-subscription?subscriptionType=Shared&ackTimeoutMillis=1000&maxRedeliverCount=5&deadLetterTopic=my-DLQ"

Copy link
Contributor

@merlimat merlimat left a comment

Choose a reason for hiding this comment

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

👍

@merlimat merlimat added this to the 2.3.0 milestone Nov 9, 2018
@merlimat merlimat added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Nov 9, 2018
@merlimat merlimat merged commit 34ab423 into apache:master Nov 9, 2018
@cbornet cbornet deleted the websocket-deadletter branch November 9, 2018 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants