apache / pulsar

Apache Pulsar - distributed pub-sub messaging system
https://pulsar.apache.org/
Apache License 2.0
14.14k stars 3.57k forks source link

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

Open xqianwang opened 3 years ago

xqianwang commented 3 years ago

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):

Additional context Add any other context about the problem here.

Jason918 commented 3 years ago

@xqianwang Hi, can you add more detailed info about how to set up websocket client to reproduce this issue ? I am using cmd bin/pulsar-client produce <topic> -n 1000 -r 1000 and sets brokerServiceUrl=ws://localhost:8080/ in conf/client.conf. Not able to reproduce this issue.

codelipenghui commented 2 years ago

The issue had no activity for 30 days, mark with Stale label.