Skip to content

Instantly share code, notes, and snippets.

@sachin-handiekar
Created October 15, 2011 11:46
Show Gist options
  • Select an option

  • Save sachin-handiekar/1289457 to your computer and use it in GitHub Desktop.

Select an option

Save sachin-handiekar/1289457 to your computer and use it in GitHub Desktop.
Dequeue JMS type message in Oracle AQ
declare
queue_options DBMS_AQ.DEQUEUE_OPTIONS_T;
message_properties DBMS_AQ.MESSAGE_PROPERTIES_T;
message_id RAW(2000);
my_message SYS.AQ$_JMS_TEXT_MESSAGE;
msg_text varchar2(32767);
begin
DBMS_AQ.DEQUEUE(
queue_name => 'my_queue',
dequeue_options => queue_options,
message_properties => message_properties,
payload => my_message,
msgid => message_id);
commit;
my_message.get_text(msg_text);
DBMS_OUTPUT.put_line('JMS message: ' || msg_text);
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment