Build Priority Background Jobs & Dead Letter Queues with NATS JetStream | Rethink Connectivity ep 12

preview_player
Показать описание
Job/Worker queues are an extremely common distributed computing pattern. In this episode, Jeremy goes over the architecture of a work queue with priority and dead letter queue semantics, then uses the flexibility of NATS JetStream to express this pattern from scratch.

Source code and text tutorial available here:

Sign up for RethinkConn 2024 for Free!:

NATS is a connective technology powering modern distributed systems, unifying Cloud, On-Premise, Edge, and IoT.

Рекомендации по теме
Комментарии
Автор

Great video!
One thing I do using nakWithDelay is using it for supporting scheduling messages into the future. Many times you don't want to send an email now, you want to send it 1 or 2 hours into the future. So I set a header with schedule time, and on consumer end I check this header and nak with delay so that jetstsream redelivers this message at that time. This means your number of max attempts should be whatever you want + 1 since the first nak is not actually a failure.

vamshiaruru
Автор

When the message has reached the redeliveries limit, is there any way to "reset" this counter for this message, so it can be redelivered again? That might be useful when you had a bug in your consumer that was preventing the delivery, but then you've fixed it and now it should be capable of processing these pending messages normally.

pmzajaczkowski
Автор

❤ Sharing practical examples is amazing, thanks Jeremy!!! 😊

wayneeseguin
Автор

hey thank you for the greate content. i just have a problem that i want to send message to a specific container of same workers and it seems that there's no way to do this, if i'm wrong please help me 😁

alirezaramezanpour
Автор

Does NATS offer a way to order queues? E.g. start processing messages from queue B only after queue A is empty.

alexanderroos
Автор

Grateful for the effort you put into creating such informative videos. Really appreciate the time and effort you invest in making these videos. Thank you! 👍

marvinlnnx
Автор

Hi thank you very much for new material :-). It's great!. I glad you publish regular, so learning is smooth :-)

maciejgebarski
Автор

Great video!! Thanks for all your efforts!

houbill
Автор

I just deployed a nice NATS server pubs and subs and I'm about to stress test it. I hope it goes well cause it was a breeze to integrate. Well done! ❤

imagineabout
Автор

Hey, I'm curious if "bench" is working for microservices as well, or is it primarily designed for streams? If it does work for microservices too, I'd really appreciate it if you could create a video exploring this topic. Thanks!

marvinlnnx
Автор

BTW, Which app you use to draw diagram?

ucduy