You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: dispatcher/README.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,3 +44,15 @@ rather in order:
44
44
1.[x] When RabbitMQ quits or crashes it will forget the queues and messages unless you tell it not to: we need to mark both the queue and messages as durable
45
45
1.[ ] Add auto-retry (DLQ). rabbit is smart and doesn't let me process a message again unless i force it.. https://devcorner.digitalpress.blog/rabbitmq-retries-the-new-full-story/
46
46
1.[ ] add the telegram queue
47
+
1. investigate the massmailer queue: a queue which picks every message, and creates a list of "bcc" to send only one email? (danger: queue needs something like batch ack..) - OR it is not feasible at all because "mass"mailer is still "personalised" mailer?
48
+
49
+
1. why do we even have a `<`title`>` (which is dynamic), why not using directly the subject? (re: the body of the email)
50
+
1. remove extension Jinja2 (into jinja)
51
+
1. make it such that templates list is read from fs (for dynamic tests)
wait_for=REQUEUE_DELAY_DURATIONS[4] # TODO make it dynamic
130
-
131
-
print(f'DLQ')
132
-
print(properties.headers)
133
-
print(f'Message was in "{properties.headers["x-first-death-exchange"]}" (specifically "{properties.headers["x-first-death-queue"]}" queue) and was rejected because: {properties.headers["x-first-death-reason"]}')
Output: Requeue on normal exchange (if error about missing template)
156
171
OR
157
-
Output: Remove (if limit time reached) #TODO
172
+
Output: Remove (if unfixable error)
158
173
"""
159
174
160
-
print(f'REQUEUE-WAIT')
161
-
print(properties.headers)
162
-
print(f'Message was in "{properties.headers["x-first-death-exchange"]}" (specifically "{properties.headers["x-first-death-queue"]}" queue) and was rejected because: {properties.headers["x-first-death-reason"]}')
163
-
print()
175
+
if (properties.headers["reason"] =='parameter_undefined'):
176
+
print('Impossible to fix error, dropping message')
177
+
#TODO output something/notify to leave a trail for better debugging on what was missing
178
+
ch.basic_ack(delivery_tag=method.delivery_tag)
179
+
return
164
180
165
181
channel.basic_publish(exchange='eml',
166
182
routing_key='mail',
167
183
body=body,
168
184
properties=pika.BasicProperties(
185
+
headers=properties.headers, # propagation to avoid endless loop
0 commit comments