This content has been marked as final. Show 2 replies
982487 wrote:Hi Amartya,
I am a new member to the forum as well as started programming in OCI with Oracle AQ. I need a help to resolve my problem from this open forum. I have created a oracle AQ in Db and register a consumer name for the same. Now i will register the same consumer name from C/OCI to monitor the queue. Now if there is any message got inserted into the same queue, I should get a notification from the queue, so that based on that notification, OCI/C program can call a asynchronous callback from that event.
1. Queue is created through PL/SQL
2. Consumer is registered with PL/SQL
3. C/OCI program is written to register the consumer.
4. Now from PL/SQL, we will push the message in the queue.
5. Based on the message enqueue, C/OCI program will get notification.(Like message queuing should notify that new message came to queue.)
Is this possible, that any insertion of message in the queue will notify the C binary code. If yes, please provide me a bit more details on the same. Thanks in advance.
It appears if you are using OCCI and C++, you can use Oracle's Listener object to check for queue events:
I don't see anything for OCI using C, though.
If you have no luck with Oracle support, and cannot get a response from the forum, you may try:
1. Using an infinite loop in the C program.
2. Calling the provided pl/sql procedures via the OCI program to check and/or update the queue from C once processing has been completed. (http://docs.oracle.com/cd/E11882_01/appdev.112/e10646.pdf)
Hope this helps.
Edited by: jchristian on Jan 18, 2013 9:19 AM