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?