Skip to content

flaky behavior with DeliverNewPolicy #1465

Answered by piotrpio
el-hivo asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @el-hivo. Client does not do consumer cleanup automatically, that is handled by the server. The reason why you're sometimes seeing the consumer after restarting the app is a parameter on ConsumerConfig called InactiveThreshold. This is the value which server uses to clean up existing non-active (not actively polling for messages) consumers. So if you stop consuming for InactiveThreshold, the consumer is automatically removed from server. Default value for this parameter is 5 seconds.

Depending on your needs, you can either:

  1. Make sure the consumer is never deleted (either by setting InactiveThreshold to a large value or by setting Durable field on ConsumerConfig).
  2. Make sure the consum…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@el-hivo
Comment options

Answer selected by el-hivo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants