zlacker

[parent] [thread] 5 comments
1. Rapzid+(OP)[view] [source] 2019-05-27 20:38:35
The biggest gotcha in a design like this IMHO is that you can't post and delete atomically. You may post the new work into the queue and then a failure to delete could occur and the work will stack.

Depending on the workload this could be not a big deal or very expensive. Treating a queue as a database, particularly queues that can't participate in XA transactions, can get you in trouble quick.

replies(2): >>nine_k+yl >>kondro+r41
2. nine_k+yl[view] [source] 2019-05-28 01:17:19
>>Rapzid+(OP)
With a realistic, that is, not 100% reliable, queue you can have either "at most once" or "at least once" delivery anyway. "Exactly once" can't be guaranteed.

So a duplicate message should be processed as normal anyway, e.g. by deduplication within a reasonable window, and/or by having idempotent operations.

replies(1): >>Rapzid+IO1
3. kondro+r41[view] [source] 2019-05-28 12:03:21
>>Rapzid+(OP)
But you could adjust the message visibility timeout of the message you received so that it appears back later in the queue itself.
replies(1): >>Rapzid+JN1
◧◩
4. Rapzid+JN1[view] [source] [discussion] 2019-05-28 17:02:47
>>kondro+r41
For this specific use case, as described, this sounds like a possible very good approach.
replies(1): >>kondro+tq2
◧◩
5. Rapzid+IO1[view] [source] [discussion] 2019-05-28 17:10:26
>>nine_k+yl
Yes, it depends on the workload. Idempotency is typically always a good idea, but sometimes the operation itself is very expensive in terms of time, resources, and/or money. I have also seen people try to update the message when writing it back(with checkpoint information and etc) for long running processes. A slew of issues, including at least once delivery, can cause workflow bifurcation. Deduplication via FIFO _can_ help mitigate this, but it has a time window that needs to be accounted for. Once you start managing your own deduplication I'd say it has moved past trying to go databaseless.
◧◩◪
6. kondro+tq2[view] [source] [discussion] 2019-05-28 21:08:23
>>Rapzid+JN1
One thing to be aware of for this approach though is that you can only have 120k in-flight messages per queue.
[go to top]