Friday, March 18, 2011

Creating an AQ queue for SOA consumption

Here is how to simply create an Oracle AQ called "MyQueue" to be used by your SOA Suite AQ Adapter. This AQ is of a message type SYS.XMLType which allows any XML payload to be stored.

  dbms_aqadm.stop_queue (queue_name => 'MyQueue');

  dbms_aqadm.drop_queue (queue_name => 'MyQueue');

  dbms_aqadm.drop_queue_table (queue_table => 'MyQueueTable');

  dbms_aqadm.create_queue_table(Queue_table => 'MyQueueTable',
                         Queue_payload_type => 'SYS.XMLType',
                         multiple_consumers => true,
                         sort_list          => 'priority,enq_time',
                         compatible         => '10.0.0');

  dbms_aqadm.create_queue (Queue_name => 'MyQueue',
                    Queue_table       => 'MyQueueTable');
  dbms_aqadm.start_queue(queue_name   => 'MyQueue',
                    enqueue           => TRUE,
                    dequeue           => TRUE);

Ahmed Aboulnaga


pharmacy wiki said...

I do not understand the meaning of dbms_aqadm.start_queue(queue_name => 'MyQueue',
enqueue => TRUE,
dequeue => TRUE);
I would like to still reading about it, I want to have more information.

Anonymous said...

sql to enqueue a message ?

Ahmed Aboulnaga said...

Check step #5 in this blog post: