Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> implementing a messaging queue through the database.

implementing a messaging queue through the database.

From: Eran Dvey-Aharon <eran_at_prosight.com>
Date: 24 Mar 2002 04:01:22 -0800
Message-ID: <ce3f1689.0203240401.41cf3a7@posting.google.com>


Hi !

I am trying to implement a messaging queue, with multiple readers and writers through the database. I want to implement it without any locks.

The writers add entries with the sequence column. My problem is with the readers : I don't want each reader to read again messages it read on the last time. The sequence index is not helping me, because if I read messages 1,2,3,4,6 I have no idea if I will have to read '5' in the future (because the transaction writing it didn't end), or the transaction was aborted and it will never appear.

Because of that reason, I must read all messages the next time I want to read, and keep an internal read what I've read before.

THERE MUST BE A MORE ELEGANT WAY DOING IT. Please advice ....

Eran Received on Sun Mar 24 2002 - 06:01:22 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US