Allow creating transient queues with no expire
When an operator rely on rabbitmq policies, there is no point to set the queue TTL in config. Moreover, using policies is much more simpler as you dont need to delete/recreate the queues to apply the new parameter (see [1]). So, adding the possibility to set the transient queue TTL to 0 will allow the creation of the queue without the x-expire parameter and only the policy will apply. [1] https://www.rabbitmq.com/parameters.html#policies Related-bug: #2031497 Signed-off-by: Arnaud Morin <arnaud.morin@ovhcloud.com> Change-Id: I34bad0f6d8ace475c48839adc68a023dd0c380de
This commit is contained in:
parent
3438726dd0
commit
f23f3276c4
@ -195,12 +195,16 @@ rabbit_opts = [
|
||||
'Used only when rabbit_quorum_queue is enabled, '
|
||||
'Default 0 which means dont set a limit.'),
|
||||
cfg.IntOpt('rabbit_transient_queues_ttl',
|
||||
min=1,
|
||||
min=0,
|
||||
default=1800,
|
||||
help='Positive integer representing duration in seconds for '
|
||||
'queue TTL (x-expires). Queues which are unused for the '
|
||||
'duration of the TTL are automatically deleted. The '
|
||||
'parameter affects only reply and fanout queues.'),
|
||||
'parameter affects only reply and fanout queues. Setting '
|
||||
'0 as value will disable the x-expires. If doing so, '
|
||||
'make sure you have a rabbitmq policy to delete the '
|
||||
'queues or you deployment will create an infinite number '
|
||||
'of queue over time.'),
|
||||
cfg.IntOpt('rabbit_qos_prefetch_count',
|
||||
default=0,
|
||||
help='Specifies the number of messages to prefetch. Setting to '
|
||||
|
@ -0,0 +1,11 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Allow creation of transient queues with no expire.
|
||||
When an operator rely on rabbitmq policies, there is no point to set the
|
||||
queue TTL in config.
|
||||
When the rabbit_transient_queues_ttl is set to 0, no x-expire parameter
|
||||
will be set on queue declaration.
|
||||
In that specific situation, it is recommended to set an expire value using
|
||||
rabbitmq policies.
|
||||
See https://www.rabbitmq.com/parameters.html#policies
|
Loading…
Reference in New Issue
Block a user