Oracle AQ dequeue order

Posted by yawn on Stack Overflow See other posts from Stack Overflow or by yawn
Published on 2009-11-19T15:11:42Z Indexed on 2010/03/27 1:03 UTC
Read the original article Hit count: 327

Filed under:
|
|

A trigger in an Oracle 10g generates upsert and delete messages for a subset of rows in a regular table. These messages consist out of two fields:

  • A unique row id.
  • A non-unique id.

When consuming these message I want to impose an order on the deque process that respects the following constraints:

  • Messages must be dequeued in insertion order.
  • Messages belonging to the same id must be dequeued in such a fashion that no other dequeuing process should be able to dequeue a potential successor message (or messages) with this id. Since the messages are generated using a trigger I cannot use groups for this purpose.

I am using the Oracle Java interface for AQ. Any pointers on how that could be achieved?

© Stack Overflow or respective owner

Related posts about Oracle

Related posts about advanced-queuing