Skip to content

Commit ab3b564

Browse files
authored
Merge pull request #45 from epandurski/master
Add a todo, do not pass x-message-ttl argument when creating queues
2 parents 9eb753b + 80488d4 commit ab3b564

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

development.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@ SUBSTITUTE_LOCALHOST_IN_VARS=PROTOCOL_BROKER_URL
4848
# should not be used in production! #
4949
############################################################
5050

51-
RABBITMQ_VERSION=3.8.11-management-alpine
51+
RABBITMQ_VERSION=3.13.6-management-alpine
5252
RABBITMQ_MANAGEMENT_LOCAL_PORT=15676

swpt_stomp/configure_queue.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,19 +137,23 @@ async def bind_queue() -> None:
137137

138138
# Declare the requested queue along with its corresponding
139139
# dead-letter queue, and bind it to the peer exchange.
140+
#
141+
# TODO: It would probably be better to use a "stream" instead
142+
# of classic queues here, given that we have figured out
143+
# how to do the stream offset tracking. This would allow
144+
# for high-availability. Using a "quorum" queues here is
145+
# almost certainly not a good idea, because quorum
146+
# queues consume lots of memory when there are lots of
147+
# messages in the queue, which should be expected.
140148
dead_letter_queue_name = queue_name + ".XQ"
141149
await channel.declare_queue(
142150
dead_letter_queue_name,
143151
durable=True,
144-
arguments={
145-
"x-message-ttl": 604800000,
146-
},
147152
)
148153
queue = await channel.declare_queue(
149154
queue_name,
150155
durable=True,
151156
arguments={
152-
"x-message-ttl": 604800000,
153157
"x-dead-letter-exchange": "",
154158
"x-dead-letter-routing-key": dead_letter_queue_name,
155159
},

0 commit comments

Comments
 (0)