dequeue by message id

DECLARE 
  dq_prop    DBMS_AQ.message_properties_t;
  dq_opt     DBMS_AQ.dequeue_options_t;
  message_id RAW( 16 );
  payload    <your payload>
BEGIN
  dq_opt.msgid := <your message id>
  dq_opt.wait := DBMS_AQ.NO_WAIT;
  dq_opt.navigation := DBMS_AQ.FIRST_MESSAGE;
  dq_opt.dequeue_mode := DBMS_AQ.REMOVE;

  DBMS_AQ.dequeue( <queue name>, dq_opt, dq_prop, payload, message_id );
END;
/
Gallery

Create a payload for Oracle Advanced Queuing

Before you can do anything with Oracle Advanced Queuing, you need to create a new type that will be used as the payload. The payload is the part of a message that your system sends or receives, and it will … Continue reading