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

EnableZeroQueueConsumer fails with RetryEnable true or a DLQ policy #1319

Open
telnoratti opened this issue Dec 12, 2024 · 1 comment
Open
Assignees
Labels

Comments

@telnoratti
Copy link

Expected behavior

Setting EnableZeroQueueConsumer in the ConsumerOptions along with a DLQ policy or RetryEnable set to true, then calling Receive should return a message if there are messages.

Actual behavior

It never returns and there's an error printed ERRO[0000] unable to send initial permits to broker consumerID=2 error="invalid number of permits requested: 0" name=jgehd subscription=<subscription> topic="persistent://tenant/namespace/topic".

Steps to reproduce

consumer, err = client.Subscribe(pulsar.ConsumerOptions{
	Topic:            "persistent://tenant/namespace/topic",
	SubscriptionName: "subscription",
	Type:                        pulsar.Shared,
	RetryEnable:             true,                // When set to false this works as expected
	EnableZeroQueueConsumer: true,
}
consumer.Receive(context.Background())  // never returns even if there are messages

If I had to guess, I'd say that since this is because multiTopicConsumer it's not using the zeroQueueConsumer implementation. I am running with the patch from #1278.

System configuration

Pulsar version: 3.3.1
Library version: 0.14.1

@crossoverJie crossoverJie self-assigned this Dec 12, 2024
@crossoverJie
Copy link
Member

Thanks for your feedback, I will deal with this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants