|
103 | 103 | -define(RA_SYSTEM, quorum_queues).
|
104 | 104 | -define(RA_WAL_NAME, ra_log_wal).
|
105 | 105 |
|
| 106 | +-define(DEFAULT_DELIVERY_LIMIT, 20). |
| 107 | + |
106 | 108 | -define(INFO(Str, Args),
|
107 | 109 | rabbit_log:info("[~s:~s/~b] " Str,
|
108 | 110 | [?MODULE, ?FUNCTION_NAME, ?FUNCTION_ARITY | Args])).
|
@@ -320,7 +322,14 @@ ra_machine_config(Q) when ?is_amqqueue(Q) ->
|
320 | 322 | OverflowBin = args_policy_lookup(<<"overflow">>, fun policyHasPrecedence/2, Q),
|
321 | 323 | Overflow = overflow(OverflowBin, drop_head, QName),
|
322 | 324 | MaxBytes = args_policy_lookup(<<"max-length-bytes">>, fun min/2, Q),
|
323 |
| - DeliveryLimit = args_policy_lookup(<<"delivery-limit">>, fun min/2, Q), |
| 325 | + DeliveryLimit = case args_policy_lookup(<<"delivery-limit">>, fun min/2, Q) of |
| 326 | + undefined -> |
| 327 | + rabbit_log:info("~ts: delivery_limit not set, defaulting to ~b", |
| 328 | + [rabbit_misc:rs(QName), ?DEFAULT_DELIVERY_LIMIT]), |
| 329 | + ?DEFAULT_DELIVERY_LIMIT; |
| 330 | + DL -> |
| 331 | + DL |
| 332 | + end, |
324 | 333 | Expires = args_policy_lookup(<<"expires">>, fun min/2, Q),
|
325 | 334 | MsgTTL = args_policy_lookup(<<"message-ttl">>, fun min/2, Q),
|
326 | 335 | #{name => Name,
|
|
0 commit comments