Skip to content

Commit 4e86e71

Browse files
committed
Update README
1 parent fdcff93 commit 4e86e71

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,26 @@ AioPikaBroker parameters:
135135
* `qos` - number of messages that worker can prefetch.
136136
* `declare_queues` - whether you want to declare queues even on
137137
client side. May be useful for message persistance.
138+
* `declare_queues_kwargs` - see [Custom Queue Arguments](#custom-queue-arguments) for more details.
139+
140+
## Custom Queue Arguments
141+
142+
You can pass custom arguments to the underlying RabbitMQ queue declaration by using the `declare_queues_kwargs` parameter of `AioPikaBroker`. If you want to set specific queue arguments (such as RabbitMQ extensions or custom behaviors), provide them in the `arguments` dictionary inside `declare_queues_kwargs`.
143+
144+
These arguments will be merged with the default arguments used by the broker (such as dead-lettering and priority settings).
145+
146+
**Example:**
147+
148+
```python
149+
broker = AioPikaBroker(
150+
declare_queues_kwargs={
151+
"arguments": {
152+
"x-message-ttl": 60000, # Set message TTL to 60 seconds
153+
"x-queue-type": "quorum", # Use quorum queue type
154+
}
155+
}
156+
)
157+
```
158+
159+
This will ensure that the queue is created with your custom arguments, in addition to the broker's defaults.
160+

0 commit comments

Comments
 (0)