Using the AQ adapter to consume messages from the database

In this recipe, we will configure an inbound AQ adapter, so that it can be used to consume messages from a queue implemented in the database by Oracle AQ. The adapter will be used from a proxy service as shown in the following screenshot:

Using the AQ adapter to consume messages from the database

The queue EVENT_QUEUE that we will use has been set up with the OSB Cookbook standard environment using the following SQL and PL/SQL code:

--creating the object type, which defines payload CREATE OR REPLACE TYPE event_typ as OBJECT ( id NUMBER(19) , event_type VARCHAR2(30) , event_time TIMESTAMP ) -- creating queue table BEGIN sys.dbms_aqadm.create_queue_table( ...

Get Oracle Service Bus 11g Development Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.