Forum Stats

  • 3,817,438 Users
  • 2,259,333 Discussions
  • 7,893,774 Comments

Discussions

Online Query using Request - Response Queues

3004
3004 Member Posts: 204,171 Green Ribbon
Has anyone made experiences of implementing
an request response mechanism with the following configuration:

2 different database servers (A and B) each having a Queue for Request-Objects and Response-Objects. Is it possible to communicate near realtime?

The following steps have to be done:

1. Producer enqueues in A request-Q and waits for a response
2. Oracle process propagates message from Request Queue A->B
3. Consumer dequeues in B request-Q
4. Consumer processes data and enqueues Response Message to his local response-Q
5. Oracle process propagates message from B->A
6. The Process of step 1 will look for the response message an dequeue it.

Will it be possible to do this within 1-2 seconds?

Are there API-functions to wait for an answer?

A simple approach could be to look after 2 seconds in the response Queue and maybe the answer would be there or, if still absent, the process ends with an timeout exception.

All in all: Is it good practice to do online queries in external oracle based systems by processing request and response messages using AQ.

Are there recommendations how to use Advanced Queuing to turn it into a MOM (Message Oriented Middleware), or is it only useful for replication purposes.

Thanks for reading, Markus.

Comments

  • 3004
    3004 Member Posts: 204,171 Green Ribbon
    Hi Markus,

    Advanced Queuing is the message queuing feature of the Oracle database. It has a superset of MOM functionality. Please visit site http://otn.oracle.com/products/aq/ for more information on AQ.

    You can use AQ in the scenario you described. The response time would depend your propagation schedule settings and system load.

    The producer of the message after putting in the message in the queue can wait for dequeue in the response queue. He can either wait based on the correlation id or a message property or the message content. Wait based on message property and the message content is available in Oracle9i. You would have to use wait based on correlation id in Oracle8i. It might help to create an index on correlation id on the queuetable to get better performance.

    cheers,
    Brajesh.
This discussion has been closed.