Monday, September 9, 2019

#729 OIC AQ adapter


















Queue Setup in Oracle Advanced Queuing


First step was to set up the Q in AQ.

CREATE type Message_typ as object (
subject     VARCHAR2(30),
text        VARCHAR2(80)); 

EXECUTE DBMS_AQADM.CREATE_QUEUE_TABLE (queue_table => 'objmsgs80_qtab',queue_payload_type => 'Message_typ');

EXECUTE DBMS_AQADM.CREATE_QUEUE (queue_name => 'msg_queue',queue_table => 'objmsgs80_qtab');
EXECUTE DBMS_AQADM.START_QUEUE (queue_name => 'msg_queue');

I then created a procedure to create a message -

CREATE OR REPLACE PROCEDURE P_AQ_ENQ AS
  enqueue_options      dbms_aq.enqueue_options_t;
   message_properties   dbms_aq.message_properties_t;
   message_handle      RAW(16);
   message             Message_typ;
BEGIN
   message := message_typ('NC MESSAGE','Gruess Gott von AQ');
   dbms_aq.enqueue(queue_name => 'msg_queue',enqueue_options => enqueue_options,message_properties => message_properties, payload => message, msgid => message_handle);
   commit;
   END;

Create the Integration in OIC

simple use case, de-queue message and write it to a file.


























AQ getMsg configured as follows -


























I set Tracking -















I now execute the plsql procedure to enque a message -













I check my ftp directory -













I check out the Monitoring/Tracking screen -













simple and succinct.




No comments: