From: | Erik Brandsberg <erik(at)heimdalldata(dot)com> |
---|---|
To: | aditya desai <admad123(at)gmail(dot)com> |
Cc: | pgsql-sql <pgsql-sql(at)lists(dot)postgresql(dot)org> |
Subject: | Re: LISTEN / NOTIFY |
Date: | 2021-10-11 16:59:06 |
Message-ID: | CAFcck8HhEURN0bdBubLxC6TDdJjsvQiWb8DDOO0n7NV4KL0iyA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
As others have said, a queue system and message system are not exactly the
same. Can you explain your goal, as the listen/notify may not be
appropriate for your use. If what you want is really just a message
system, then the example we based our code on is at
https://jdbc.postgresql.org/documentation/81/listennotify.html.
Keep in mind, if you connect (or reconnect) to the listen interface, you
won't get any messages sent before it, so it isn't exactly what you want if
you need a persistent queue, say for a job queue. We use it for
invalidating cache content.
On Mon, Oct 11, 2021 at 11:31 AM aditya desai <admad123(at)gmail(dot)com> wrote:
> Hi Erik,
> Thanks for response. We will be implementing it in Java or .NET. Could you
> please send steps for Java?
>
> I am not a Java expert and I am completely DB person. So do we need
> external API to enqueue and dqueue messages. Completely new to this
> concept. Please bear with me :)
>
> Regards,
> Aditya.
>
> On Monday, October 11, 2021, Erik Brandsberg <erik(at)heimdalldata(dot)com>
> wrote:
>
>> You will need to provide more info, such as what language and driver you
>> are trying to implement this with. I have implemented it with Java, but
>> the driver has a specific API to implement this.
>>
>> On Mon, Oct 11, 2021 at 10:12 AM aditya desai <admad123(at)gmail(dot)com> wrote:
>>
>>> Hi,
>>> Has anyone implemented LISTEN / NOTIFY to enqueue and dequeue messages
>>> to and from Postgres? Do you have steps to implement it?
>>>
>>> Regards.
>>> Aditya.
>>>
>>
>>
>> --
>> *Erik Brandsberg*
>> erik(at)heimdalldata(dot)com
>>
>> www.heimdalldata.com
>> +1 (866) 433-2824 x 700
>> [image: AWS Competency Program]
>> <https://aws.amazon.com/partners/find/partnerdetails/?n=Heimdall%20Data&id=001E000001d9pndIAA>
>>
>
--
*Erik Brandsberg*
erik(at)heimdalldata(dot)com
www.heimdalldata.com
+1 (866) 433-2824 x 700
[image: AWS Competency Program]
<https://aws.amazon.com/partners/find/partnerdetails/?n=Heimdall%20Data&id=001E000001d9pndIAA>
From | Date | Subject | |
---|---|---|---|
Next Message | Steve Midgley | 2021-10-11 19:09:37 | Re: Removing JSONB key across all elements of nested array |
Previous Message | aditya desai | 2021-10-11 16:36:09 | Re: LISTEN / NOTIFY |