You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/11/09 11:39:51 UTC
[GitHub] cbornet opened a new pull request #2968: Websocket dead letter
topic (PIP22)
cbornet opened a new pull request #2968: Websocket dead letter topic (PIP22)
URL: https://github.com/apache/pulsar/pull/2968
### Motivation
[PIP22 Dead Letter Topic](https://github.com/apache/pulsar/wiki/PIP-22%3A-Pulsar-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"
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services