pulsar-client-go icon indicating copy to clipboard operation
pulsar-client-go copied to clipboard

[bugfix] fix stuck when ProducerBlockedQuotaExceededException

Open billowqiu opened this issue 2 years ago • 2 comments

Expected behavior

fail fast when user call Send

Actual behavior

stuck in Send method image

image

Steps to reproduce

1:set a 10MB backlog in pulsar topic 2:Infinite loop call partitionProducer.Send to produce msg to that topic 3:see the sdk output : [Failed to create producer at send PRODUCER request]" error="server error: ProducerBlockedQuotaExceededException: Cannot create producer on topic with backlog quota exceeded" producerID=1

System configuration

Pulsar version: x.y

billowqiu avatar Apr 28 '22 18:04 billowqiu

@billowqiu The default action is to block the Send() when the quota is full.

You can change the behavior in the namespace (or topic) policies: https://pulsar.apache.org/docs/en/admin-api-namespaces/#configure-backlog-quota-policies

merlimat avatar Apr 28 '22 21:04 merlimat

@billowqiu The default action is to block the Send() when the quota is full.

You can change the behavior in the namespace (or topic) policies: https://pulsar.apache.org/docs/en/admin-api-namespaces/#configure-backlog-quota-policies

we need producer_exception to detect the qouta is full;Other policies are not appropriate for our scenario.

billowqiu avatar Apr 29 '22 05:04 billowqiu