Skip to content

Instantly share code, notes, and snippets.

@danielkec
Created December 17, 2020 20:17
Show Gist options
  • Select an option

  • Save danielkec/8bbd725f379d423d7a645f286f2eba46 to your computer and use it in GitHub Desktop.

Select an option

Save danielkec/8bbd725f379d423d7a645f286f2eba46 to your computer and use it in GitHub Desktop.
CREATE OR REPLACE PROCEDURE create_queue(queueName IN VARCHAR2, qType IN VARCHAR2) IS
BEGIN
dbms_aqadm.create_queue_table('FRANK.'||queueName||'_TAB', qType);
dbms_aqadm.create_queue('FRANK.'||queueName,'FRANK.'||queueName||'_TAB');
dbms_aqadm.start_queue('FRANK.'||queueName);
END;
/
-- Setup example AQ queues FRANK.EXAMPLE_QUEUE_1, FRANK.EXAMPLE_QUEUE_2, FRANK.EXAMPLE_QUEUE_3
begin
CREATE_QUEUE('example_queue_1', 'SYS.AQ$_JMS_TEXT_MESSAGE');
CREATE_QUEUE('example_queue_2', 'SYS.AQ$_JMS_TEXT_MESSAGE');
CREATE_QUEUE('example_queue_3', 'SYS.AQ$_JMS_TEXT_MESSAGE');
CREATE_QUEUE('example_queue_bytes', 'SYS.AQ$_JMS_BYTES_MESSAGE');
CREATE_QUEUE('example_queue_map', 'SYS.AQ$_JMS_MAP_MESSAGE');
end;
/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment