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

Add default policy and imeout to override the "hard coded" value consumerBuilder #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

intelradoux
Copy link

I got an issue with a broker that do not support "NEVER" as expiration policy. (if timeout is set as 0 it will means that consumer is a "temporary consumer" no matter what).
If I try to set a timeout >0 and a expiration policy to NEVER, it crash.

I created this hack to fix that. I can add 2 more parameters :
Example:
amqp://localhost:5672?amqp.defaultTimeout=2000000&amqp.defaultExpiryPolicy=link-detach

make this connection a almost a durable connection.

@gemmellr
Copy link
Member

As you note this is a bit hacky. We'll see if we can add something to similar effect at some point.

The client is using 'never' since that is whats actually needed to truly satisfy the JMS semantics for a durable subscription. The server could arguably accept that and still delete the subscription regardless after a suitably large 'administratively enforced' idle/detached period. It shouldnt accept it then delete it immediately upon detach just because the timeout (which obviously doesnt apply to the 'never' case) is 0, and obviously crashing if you set it above 0 not being ideal either. I'd suggest you raise an issue with those folks too.

@intelradoux
Copy link
Author

I know it is hacky, I raise an issue to my provider but...... let's say amqp is a side project for them......

Base automatically changed from master to main March 23, 2021 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants