Created
October 15, 2011 11:45
-
-
Save sachin-handiekar/1289453 to your computer and use it in GitHub Desktop.
Enqueue JMS type message in Oracle AQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare | |
-- Local variables here | |
queue_options DBMS_AQ.ENQUEUE_OPTIONS_T; | |
message_properties DBMS_AQ.MESSAGE_PROPERTIES_T; | |
message_id RAW(16); | |
agent SYS.AQ$_AGENT := SYS.AQ$_AGENT(' ', null, 0); | |
my_message SYS.AQ$_JMS_TEXT_MESSAGE; | |
begin | |
my_message := SYS.AQ$_JMS_TEXT_MESSAGE.construct; | |
my_message.set_text('<< sample message >>'); | |
-- Test statements here | |
DBMS_AQ.ENQUEUE( | |
queue_name => '<< queue_name >>', | |
enqueue_options => queue_options, | |
message_properties => message_properties, | |
payload => my_message, | |
msgid => message_id); | |
commit; | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment