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:
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( queue_table => 'EVENT_QUEUE_T', queue_payload_type => 'OSB_COOKBOOK.EVENT_TYP', sort_list => 'ENQ_TIME', compatible => '10.0.0', primary_instance => 0, secondary_instance => 0, storage_clause => 'tablespace USERS pctfree 10 initrans...