How to Use NOTIFY/LISTEN for Asynchronous Messaging in PostgreSQL (Producer and Consumer)

Опубликовано: 19 Сентябрь 2022
на канале: Rowadz
15,427
306

Buy me a coffee if this is useful 😀
https://www.buymeacoffee.com/rowadz

Asynchronous messages in PostgreSQL with NOTIFY/LISTEN || producer and consumer

In this video, I'm introducing the "NOTIFY" and "LISTEN " commands from PostgreSQL, showing some use cases and keynotes about using this, also comparing this with RabbitMQ.

more videos like this (🥼 Rowadz Lab 🥼):
   • 🥼 Rowadz Lab 🥼  

🔱 Graphs & trees 🔱
   • 🔱 Graphs & trees 🔱  

Links from the video:
➼ notify
https://www.postgresql.org/docs/curre...
➼ pg-listen
https://github.com/andywer/pg-listen
➼ PostgreSQL LISTEN/NOTIFY by Dimitri Fontaine
https://tapoueh.org/blog/2018/07/post...
➼ What is SKIP LOCKED for in PostgreSQL 9.5?
https://www.enterprisedb.com/blog/wha...
➼ Postgres Listen/Notify As Message Queue
https://dba.stackexchange.com/questio...
➼ pgsql-listen-exchange
https://github.com/gmr/pgsql-listen-e...
➼ Listening to generic JSON notifications from PostgreSQL in Go
https://coussej.github.io/2015/09/15/...


00:00 Intro to the notify and listen commands
01:42 Two differences from RabbitMQ
03:25 Cache - a use case from an article
04:55 Duplicate payloads in the same transactions
08:16 Notify and SQL transactions
09:06 The order of notifications and duplicated payloads
09:50 How to handle the notification looping back to the sender
12:51 Historical data - a use case with code example from an article
13:58 How big is the notification queue and about the queue cleanup
15:30 Summary
17:30 Some useful links


Смотрите видео How to Use NOTIFY/LISTEN for Asynchronous Messaging in PostgreSQL (Producer and Consumer) онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Rowadz 19 Сентябрь 2022, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 15,427 раз и оно понравилось 306 людям.