apache / apache/pulsar

Pulsar websocket client still getting result ok when websocket ProducerHandler throw an error

Open
#10,757 2 comments 0 reactions 0 assignees View on GitHub
lifecycle/stale type/bug
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 22h
Merged PRs (30d)
142

Description

**Describe the bug**
Using java websocket client for publishing messages to pulsar. At the beginning it was good. But when producer send queue is full, pulsar websocket server ProducerHandler throws errors: ` Error occurred while producer handler was sending msg from /127.0.0.1:37254: org.apache.pulsar.client.api.PulsarClientException$ProducerQueueIsFullError: Producer send queue is full`.
On the java websocket client side, it still receive result ok ack from server: `{"result":"ok","messageId":"CPEKEINF","context":"1","errorCode":0,"schemaVersion":0} from server`
**To Reproduce**
Steps to reproduce the behavior:
1. Launch pulsar standalone and java websocket client connecting pulsar websocket server producer endpoint.
2. keep publishing messages until producer send queue is full. Pulsar websocket ProducerHandler throws errors.
3. Websocket client still receive result ok message from server

**Expected behavior**
Websocket client sending message should be blocked.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: windows

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the queue-full condition with Pulsar standalone and the Java websocket client, then inspect the websocket ProducerHandler error path and the acknowledgement handling. Done means a producer send that hits a full queue no longer returns a successful result-ok acknowledgement and instead communicates the failure to the client.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.