Re: LISTEN / NOTIFY

Поиск
Список
Период
Сортировка
От Steve Midgley
Тема Re: LISTEN / NOTIFY
Дата
Msg-id CAJexoSKRENPKy9u6MGWD34q4tPrNxBCvqsjKwHOkO-oR31Thzw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: LISTEN / NOTIFY  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: LISTEN / NOTIFY  (aditya desai <admad123@gmail.com>)
Список pgsql-sql

On Mon, Oct 11, 2021 at 8:36 AM David G. Johnston <david.g.johnston@gmail.com> wrote:


On Monday, October 11, 2021, aditya desai <admad123@gmail.com> wrote:
Hi,
Has anyone implemented LISTEN / NOTIFY to enqueue and dequeue messages to and from Postgres? Do you have steps to implement it? 

Listen/notify are not a queuing system, they are a notification system.

I agree with David - you _could_ implement a work queue using LISTEN / NOTIFY as primitive components, but they are not anything like a complete queuing system. I would recommend implementing any number of open source or licensed message queue solutions that will work with Postgres. RabbitMQ is widely known and used. I've used SideKiq and Resque (both being in Ruby, a language I like). I think it would be unwise to implement your own queue system directly on top of LISTEN/NOTIFY. There are so many edge cases to queue management, it's almost like implementing your own encryption algorithm on top of Postgres' math functions. There are OSS tools out there that will almost certainly do what you want.

Steve




В списке pgsql-sql по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: LISTEN / NOTIFY
Следующее
От: aditya desai
Дата:
Сообщение: Re: LISTEN / NOTIFY