Notification on a multiconsumer queue

I have created a multiconsumer queue. The intention is to have multiple instances of my applications receive updates whenever
the table is updated.
The trigger is defined as such
CREATE OR REPLACE TRIGGER CHANGE_HISTORY_TRIGGER AFTER INSERT ON VALUE_CHANGE_HISTORY
FOR EACH ROW
DECLARE
queueopts DBMS_AQ.ENQUEUE_OPTIONS_T;
msgprops DBMS_AQ.MESSAGE_PROPERTIES_T;
msgid RAW(16);
Triggered VARCHAR2(255);
my_msg Change_History_Trigger_Data;
BEGIN
SELECT LPath INTO Triggered FROM LP WHERE ID = :new.ID;
my_msg := Change_History_Trigger_Data(Triggered);
DBMS_AQ.ENQUEUE ('History_Queue',
queueopts,
msgprops,
my_msg,
msgid);
END CHANGE_HISTORY_TRIGGER;
In my application, I create an occi::aq::subscription object as follow
m_pAQSubscription = new oracle::occi::aq::Subscription(m_pEnvironment);
m_pAQSubscription->setSubscriptionNamespace(oracle::occi::aq::Subscription::NS_AQ);
m_pAQSubscription->setProtocol(oracle::occi::aq::Subscription::PROTO_CBK);
m_pAQSubscription->setCallbackContext((void *)this);
m_pAQSubscription->setSubscriptionName("History_Queue:Application_Name_1");
m_pAQSubscription->setPresentation(oracle::occi::aq::Subscription::PRES_DEFAULT);
m_pAQSubscription->setNotifyCallback(&COracleDB::ChangeHistoryCallback); m_pEnvironment->enableSubscription(*m_pAQSubscription); std::vector<oracle::occi::aq::Subscription> vSubscriptionList;
vSubscriptionList.push_back(*m_pAQSubscription);
m_pAQConn->registerSubscriptions(vSubscriptionList);
However, I keep getting ORA-24033 error whenever VALUE_CHANGE_HISTORY table is updated.
Is there anything missing in my code?
I've tried creating an Agent in the script. E.g.
recipients(1) := sys.aq$_agent('anydata_subscriber', NULL, NULL);
msgprops.recipient_list :=recipients;
and modified the following in my code;
m_pAQSubscription->setSubscriptionName("anydata_subscriber");
This works fine, but does that mean that each application instance can use the same agent, or do I need to create a
new agent with each instance?

Following is oracle description , hence separate NEW agents are required.
Cause: An enqueue was performed on a queue that has been set up for
multiple dequeuers but there were neither explicit recipients
specified in the call nor were any queue subscribers determined
to be recipients for this message.
Action: Either pass a list of recipients in the enqueue call or add
subscribers to the queue for receiving this message.

Similar Messages

  • Interconnect AQ adapter writing to a multiconsumer queue

    Can we use IC 10.1.2 AQ adapter to write to a multiconsumer queue ?
    Consumer name is dynamic and available in the published message. Can we set that value using iStudio or any other way ?
    thanks,
    Sadeepa

    Sadeepa,
    Not sure if I understand your question.
    If you have a publishing system, and two or more subscribing systems to that mesage, then without using Content Based Routing, each of the target (subscribing) systems would get that message?
    In your message you could have a tag called <TARGET_SYSTEM>, and you can dynamically put the target adapter name in that field when you create the message.
    Then when you publish the message, use CBR routing rules to route the message to only one (or more than one if you like) target system.
    Is the "multiconsumer queue" the OAI Hub queue, or a queue on a target system?
    Yan

  • Notification for the Blocked Queues

    Hi,
    My environment is PI 7.0 and in my monitoring transaction (SXMB_MONI) getting the messages has Scheduled for Outbound Processing (The Icon is like (>) ).
    I checked my SMQ2 of my XI/PI system and I can see some of the messages got blocked in the Queue. The Queue message is XBT0*******. Manually unlocked the messages and activated my Queues and refreshed the queue cleared in couple of mins.
    The problem was caused by the PI**USER got locked and unlocked the user few days back.
    I want to know is their any possible way to get a notification for the Scheduled for Outbound Processing messages (>).
    Other then Scheduled for Outbound Processing (>) messages we can get the notifications. We can get for notification for the Red Flag, Green Flag, and White Flag). What about the Scheduled for Outbound Processing messages (>) Flag????
    Give your ideas to monitor this kind of errors by notification.
    Thanks,
    GM.

    Hi, GM:
    This can be achieved by setting CCMS alert to monitor the status of the queue, please check the link:
    http://help.sap.com/saphelp_nw70/helpdata/en/f0/02a63b9bb3e035e10000000a114084/frameset.htm
    Also check the How-To guide:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/0b4580be-0601-0010-d3ad-bd6ce51ae916
    Liang

  • OCI client notification without a AQ queue

    Hi Forum,
    Well, put it in the simplest manner, I want to run a perl script when a Insert trigger occurs.
    And I was wondering if it is possible that a OCI client be notified, when a trigger occurs, without using a AQ queue ?
    I ask that because in Oracle Manuals we can find this:
    An OCI application can:
    * register interest in notifications in the AQ namespace and be notified when an enqueue occurs.
    * register interest in subscriptions to database events and receive notifications when the events are triggered.
    * manage registrations, such as disabling registrations temporarily or dropping the registrations entirely.
    * post, or send, notifications to registered clients.
    Hoping to hear from you soon, forum.
    Pedro Campos Galvão
    Edited by: user639404 on 20/Nov/2008 16:01

    yes, you can.
    follow the oracle documentation:
    Oracle Call Interface Programmer's Guide -
    9. OCI Programming Advanced Topics :: Database Change Notification.

  • Push Notification Appear twice on Queue

    Hello all,
    I just schedule a push notification to be sent out later on today and noticed the notification appeared twice on the queue, I am sending this to all my users. Is the reason I am seeing 2 because my app is universal, 1 notification for my iPad users and 1 notification for my iPhone users? Thanks.

    1. Settings > General > Reset > Reset Network Settings
    2. Bite the bullet - Restore as new without using a backup (which may have corrupted data/settings.

  • Multiple Notifications enqueued on single queue not dequeued concurrently

    Hi,
    Oracle 10G database AQ behavior (10.2.0.4.0)
    1) Enqueued 5 notifications into Oracle AQ
    2) 5 Jobs are being submitted in dba_jobs in different Sessions
    3) All 5 notifications are dequeued by Callback procedure in Parallel sessions
    Oracle 11G database AQ behavior (11.2.0.3.0)
    1) Enqueued 5 notifications into Oracle AQ
    2) 1 Job is being submitted in dba_scheduler_jobs
    3) 5 notifications are being dequeued by Callback procedure in single session
    Is there a way to Dequeue messages concurrently in parallel sessions?
    Thanks
    Sridhar

    Hi Peter,
    Throughput has been decreased after moving to 11G.
    Background of code:
    Call back procedure on AQ we have consists of two parts
    1) Dequeue of first message available
    2) Calling an another procedure with information from Notification. This procedure processed all records satisfying the information from Notification.
    It takes around 6 minutes to process
    We have parameter p_var which is configured as 6 and this controls number of dbms_jobs fired as below
    LOOP
    FOR i in 1..p_var
    LOOP
    dbms_lock.allocate_unique ('QUEUE1'||i,l_lckhandle_db);
    l_rel := dbms_lock.request (l_lckhandle_db, 6, 1, FALSE);
    EXIT WHEN l_rel = 0;
    END LOOP;
    IF l_rel <> 0
    THEN
    dbms_lock.sleep (10);
    END IF;
    EXIT WHEN l_rel = 0;
    END LOOP;
    Suppose we have 10 Notifications enqueued in same second in AQ
    10G code flow:
    1) 6 jobs were fired and processing was in 6 parallel sessions
    11G code flow:
    1) only one scheduler job is fired and all 10 notifications are processed in serial.
    This is reason for less throughput in 11G.
    Do we have any way we can make this process in parallel? (not enqueing notifications in same second and changing any DB level parameter?)
    I have an idea to fire a separate dbms_job or scheduler job to process part 2 of callback procedure.
    Is this solution we can consider to problem we have or is there any other solution?
    Thanks
    Sridhar

  • In a Multiconsumer queue when I use listen() I get error ORA-00600

    I created a queue table
    SYS.DBMS_AQADM.CREATE_QUEUE_TABLE
    QUEUE_TABLE => 'TEST_QUEUE_TAB'
    ,QUEUE_PAYLOAD_TYPE => 'TEST_TYPE'
    ,COMPATIBLE => '8.1'
    ,SORT_LIST => 'ENQ_TIME'
    ,*MULTIPLE_CONSUMERS => TRUE*
    ,MESSAGE_GROUPING => 0
    End;
    This is my C# code that I am using to dequeue message synchronously in a mutli consumer queue using ODP. I am getting Oracle exception ORA-00600 in the OracleAQQueue.Listen() method. Any help I would greatly appreciate it.
    try
    string connString = "Data Source=XXX;User Id=XXX; Password=XXX";
    OracleConnection connObj = new OracleConnection(connString);
    connObj.Open();
    //create a new queue object
    OracleAQQueue queueObj = new OracleAQQueue("TEST_QUEUE", connObj);
    queueObj.MessageType = OracleAQMessageType.Udt;
    queueObj.UdtTypeName = "TEST_TYPE";
    queueObj.NotificationConsumers = new string[1] { "OPTEST" };
    queueObj.DequeueOptions.Visibility = OracleAQVisibilityMode.OnCommit;
    queueObj.DequeueOptions.ConsumerName = "OPTEST";
    queueObj.NotificationConsumers = new string[]{ "OPTEST" };
    queueObj.DequeueOptions.Wait = 100;
    string[] listenConsumers = new string[1] { "OPTEST" };
    queueObj.Listen(listenConsumers);
    catch(Exception ex)
    MessageBox.Show(ex.ToString());
    }

    ORA-00600, by definition, is an unhandled error in the Oracle database's internal code.
    Open a Support Request (SR) with Oracle or, if you do not have access, have your DBA or a senior developer do it for you.
    It is Oracle's responsibility to fix this ... not yours.

  • Notification of JMS Enabled Queue

    I have successfully managed to issue a callback when a queue is set up with a
    payload of type Message_typ as object ( subject VARCHAR2(30), text
    VARCHAR2(80)). However i need to issue a callback whenever a message is
    received by a jms enabled queues with payload types of
    a) sys.aq$_jms_text_message
    b) sys.aq$_jms_bytes_message
    Is this possible using dbms_aq.register and if so could you please give me an
    example.
    Thanks in advance

    Destinations can be created dynamically.
    check:
    http://edocs.bea.com/wls/docs61/jms/implement.html#1189112
    viswa
    "Rakesh Jaiswal" <[email protected]> wrote:
    >
    I want to knwo whether runtime binding the JMS Objects(Connection Factory
    & Destinations)
    is possible in WebLogic server?
    According to Weblogic it only binds JMS Object at the startup of the server
    using
    a Startup class?
    Thanks a million

  • PLSQL Notification on a multi-subscriber queue with sys.aq$_jms_text_messag

    Hi all,
    I am trying to get PLSQL notification working on a multi subscriber queue with sys.aq$jms_text_message as the payload type. The commands to create my queue are as follows:
    dbms_aqadm.create_queue_table(
    queue_table => 'SOA_JMS.RJMTESTxx_QTAB',
    multiple_consumers => true,
    queue_payload_type => 'sys.aq$_jms_text_message'
    dbms_aqadm.create_queue(
    queue_name=>'RJMTESTQ',
    queue_table => 'SOA_JMS.RJMTESTxx_QTAB',
    retention_time => 86400, --Keep processed messages for 24 hours
    max_retries => 3,
    retry_delay => 1
    dbms_aqadm.start_queue('RJMTESTQ');
    dbms_aqadm.add_subscriber(
    queue_name => 'SOA_JMS.RJMTESTQ',
    subscriber => sys.aq$_agent('SUBSCRIP1',null,0),
    rule => NULL,
    transformation => NULL,
    queue_to_queue => FALSE,
    delivery_mode => dbms_aqadm.persistent
    I then create a procedure with the following signature:
    create or replace procedure SOA_JMS.EXCEPTION_QUEUE_NOFIFYCB_1(
    p_context in raw,
    p_reginfo in sys.aq$_reg_info,
    p_descr in sys.aq$_descriptor,
    p_payload in raw,
    p_payloadl in number
    And register it as follows:
    reginfo := sys.aq$_reg_info(
    'SOA_JMS.RJMTESTQ:SUBSCRIP1',
    DBMS_AQ.NAMESPACE_AQ,
    'plsql://SOA_JMS.EXCEPTION_QUEUE_NOFIFYCB_1?PR=0',
    --utl_raw.cast_to_raw('STANDARDJMS')
    HEXTORAW('FF')
    reg_list := sys.aq$_reg_info_list(reginfo);
    dbms_aq.register(reg_list,1);
    The problem is the notifications are not firing as they should be.
    I have done some tracing and found an error:
    Error in PLSQL notification of msgid:BA964334E5A057A4E040C69BAF397075
    Queue :"SOA_JMS"."RJMTESTQ"
    Consumer Name :SUBSCRIP1
    PLSQL function :SOA_JMS.EXCEPTION_QUEUE_NOFIFYCB_1
    : Exception Occured, Error msg:
    ORA-00604: error occurred at recursive SQL level 2
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'EXCEPTION_QUEUE_NOFIFYCB_1'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    This says that the parameters I have for my procedure is wrong. Looking through the documents I think it is something to do with the ?PR=0 used in the register call, but I can’t find any documentation telling me what the required parameters are.
    Does anyone here know?
    Thanks
    Robert

    Hi,
    I have found the solution and I am posting here in case it helps anyone else.
    The paramater names must match the callback not just the types and in/out.
    So the following works:
    create or replace procedure SOA_JMS.EXCEPTION_QUEUE_NOFIFYCB_2(
    context in raw,
    reginfo in sys.aq$_reg_info,
    descr in sys.aq$_descriptor,
    payload in raw,
    payloadl in number
    Robert

  • Event monitoring / notification - AQ, Alerts, or what ?

    I need to know whether Oracle Advanced Queuing, or some other Oracle database facility is able to support the event notification requirements for our event driven user interface.
    I am working on moving an application to Oracle (Oracle database is my main expertise but I haven't ever used AQ). There are varying numbers of GUI clients logged in at a time, plus some background services. The application design depends on updating entities in the database and having an event notification sent to all interested GUI clients. I need to support this in the oracle environment.
    Key issues are:
    - Database triggers to initiate notification of updates
    - Different event topics for each notifiable table. Many rows in each table.
    - Every event notification must arrive. DBMS_ALERT only delivers the most recent alert.
    - Clients come and go fairly often, and the client set is not fixed. Clients are only interested in events that occur while the client is connected.
    - We don't want to be polling a table - we want to either wait for events or be notified of them.
    Is there a way of doing this using Oracle Advanced Queuing multiconsumer queues?
    Is there a better way of doing this with some other tool that comes with the 10G database?
    The descriptions of AQ I have read are oriented to having a limited, fixed set of message consumers, whereas our environment has a varying set of subscribers, so I am concerned about:
    - How heavyweight is the subscribe / unsubscribe step ? I have not seen references to it being done on the fly like this.
    - Is there a way of making the subscription be dropped when the database connection is dropped, or are they always persistent ?
    DBMS_ALERT won't do because if many alerts are raised while a listener is busy, only the latest alert is delivered.
    We are running the 10GR2 database but not the application server.
    Thanks for your advice,
         David Penington

    David,
    I have the same requirement as you.
    Basically what I have put in place is:
    - Package with sets of wrapper method to ease queue related process (enqueue, dequeue, listen, ...)
    - Related object type, queue table and different queues based on different events (update, insert, delete, ...)
    - Triggers in certain tables that are related to events described above (will only enqueue messages)
    - Application that subscribe to different queues and then calling a blocking listen in a separate thread (the listen call will be unblocked with the queue name as the out parameter)
    - I activated the Queue Monitor to clean up the consumed and expired messages
    - Other information: Oracle version 9i; non-persistent queue was not yet tested - OCI + raw :(
    So anyway, everything is ready and when I do an update on a given record I will have all the applications notified. I launch several application instances and everything is working as I expected.
    But then I have another problem: it generates too many redo logs (which in turn become archive logs). I observed this when doing a performance test; it was something like updating 20 records for 10000 times with delay between interval set to 0,5 second. That was when I noticed the excessive generation - which is finally normal because everything is done with transaction integrity.
    Until now I haven't find any solution yet... I was thinking about NO LOGGING in the tablespace specially created for the queue table, but it was not at all the solution - well I tried my luck and it didn't work :)
    Is there anyone out there that has the same requirement as me and David and has the solution for this? Maybe another way of implementing the mechanism...
    Looking forward to have some feedbacks.
    Regards,
    Kiky Shannon

  • The Publish-Subscribe Notification latency in OCI is 5 seconds

    I have an OCI application where I register a callback to receive publish-subscribe notifications from an Oracle queue.
    The problem that I have is that I am receiving messages every 5 seconds intervals (the callback is called every 5 seconds if there are messages in the queue).
    It looks like that there is a process that is monitoring the database queue every 5 seconds. Is there a way to change that behavior?.
    I am getting the same behavior in Windows and Linux systems.
    This is the PL/SQL code that I am executing to create the database queue:
    DECLARE
    subscriber sys.aq$_agent;
    BEGIN
    DBMS_AQADM.CREATE_QUEUE_TABLE(
    QUEUE_TABLE=>'TestUser."TestTable_msg_table"',
    MULTIPLE_CONSUMERS => TRUE,
    QUEUE_PAYLOAD_TYPE =>'RAW');
    DBMS_AQADM.CREATE_QUEUE(
    QUEUE_NAME=>'TestUser."TestTable_queue"',
    QUEUE_TABLE=>'TestUser."TestTable_msg_table"');
    DBMS_AQADM.START_QUEUE('TestUser."TestTable_queue"');
    subscriber := sys.aq$_agent('AGENT', null, null);
    DBMS_AQADM.ADD_SUBSCRIBER(
    QUEUE_NAME=> 'TestUser."TestTable_queue"',
    SUBSCRIBER => subscriber,
    DELIVERY_MODE => DBMS_AQ.BUFFERED);
    END;
    CREATE OR REPLACE TRIGGER TestUser."TestTable_changes"
    AFTER DELETE OR INSERT OR UPDATE ON TestUser."TestTable"
    FOR EACH ROW
    DECLARE
    enq_ct dbms_aq.enqueue_options_t;
    msg_prop dbms_aq.message_properties_t;
    enq_msgid raw(16);
    userdata raw(100);
    BEGIN
    enq_ct.visibility := DBMS_AQ.IMMEDIATE;
    enq_ct.delivery_mode := DBMS_AQ.BUFFERED;
    msg_prop.delay := DBMS_AQ.NO_DELAY;
    DBMS_AQ.ENQUEUE('TestUser."TestTable_queue"',enq_ct, msg_prop,userdata,enq_msgid);
    END;
    This is the OCI code that I am executing to register for changes into the queue:
    /* Allocate subscription */
    OCIHandleAlloc((dvoid *)hEnv,(dvoid **)&hSub,
              (ub4) OCI_HTYPE_SUBSCRIPTION,
              (size_t) 0, (dvoid **) 0);
    OCIAttrSet((dvoid *)hSub, (ub4) OCI_HTYPE_SUBSCRIPTION,
    (dvoid *) subName, (ub4) strlen(subName),
    (ub4) OCI_ATTR_SUBSCR_NAME, hError);
    /* Subscription callback */
    OCIAttrSet((dvoid *)hSub,(ub4)OCI_HTYPE_SUBSCRIPTION,
    (dvoid *) onTableChange, (ub4) 0,
    (ub4) OCI_ATTR_SUBSCR_CALLBACK, hError);
    /* Set subscription context */
    OCIAttrSet((dvoid *) tblInfo, (ub4) OCI_HTYPE_SUBSCRIPTION,
    (dvoid *) 0, (ub4) 0,
    (ub4) OCI_ATTR_SUBSCR_CTX, hError);
    /* Set subscription namespace */
    OCIAttrSet((dvoid *) hSub, (ub4) OCI_HTYPE_SUBSCRIPTION,
    (dvoid *) &subNamespace, (ub4) 0,
    (ub4) OCI_ATTR_SUBSCR_NAMESPACE, hError);
    /* Begining Registration for subscription */
    OCISubscriptionRegister(hSvc,&hSub,1,hError,OCI_DEFAULT);
    Thanks

    This has come up before. No definitive solution but a purge of the queue is worth a try:
    see=> Re: Dequeing happens only every 5 Seconds

  • Notification with user defined type results in PLS-00306: wrong number..

    I created a user defined type TLogMessage:
    CREATE OR REPLACE TYPE TLogMessage AS OBJECT
    module VARCHAR2(4000),
    severity NUMBER,
    message VARCHAR2(4000)
    I also created a multi-consumer queue using this type as payload.
    My callback procedure in the package PK_SYST_LOGMESSAGE is defined as follows:
         PROCEDURE DefaultLoggerCallback(
              context          RAW,
              reginfo          SYS.AQ$_REG_INFO,
              descr          SYS.AQ$_DESCRIPTOR,
              payload          RAW,
              payload1     NUMBER
    Finally, I registered the callback procedure as follows:
              DBMS_AQADM.ADD_SUBSCRIBER(
                   queue_name      => QUEUE_NAME,
                   subscriber      => SYS.AQ$_AGENT(
                                            name => 'default_logger',
                                            address => NULL,
                                            protocol => NULL
              DBMS_AQ.REGISTER(
                   SYS.AQ$_REG_INFO_LIST(
                        SYS.AQ$_REG_INFO(
                             name          => QUEUE_NAME || ':default_logger',
                             namespace     => DBMS_AQ.NAMESPACE_AQ,
                             callback     => 'plsql://MTDX.PK_SYST_LOGMESSAGE.DefaultLoggerCallback',
                             context          => HEXTORAW('FF')
                   1
    However, when I put a message in the queue using this procedure:
         PROCEDURE LogMessage(
              pModule          VARCHAR2,
              pSeverity     NUMBER,
              pMessage     VARCHAR2
         IS
              vMessage               TLogMessage;
              vEnqueueOptions          DBMS_AQ.ENQUEUE_OPTIONS_T;
              vMsgProperties          DBMS_AQ.MESSAGE_PROPERTIES_T;
              vMessageHandle          RAW(16);
         BEGIN
              vMessage := TLogMessage(module => pModule, severity => pSeverity, message => pMessage);
              vEnqueueOptions.visibility := DBMS_AQ.IMMEDIATE;
              vMsgProperties.correlation := pModule;
              vMsgProperties.priority := -pSeverity;
              -- Enqueue the message to all subscribers
              DBMS_AQ.ENQUEUE(
                   queue_name               => QUEUE_NAME,
                   enqueue_options          => vEnqueueOptions,
                   message_properties     => vMsgProperties,
                   payload                    => vMessage,
                   msgid                    => vMessageHandle
         EXCEPTION
              WHEN no_subscribers THEN
                   -- No subscribers on the queue; ignore
                   NULL;
         END;
    I can see the message in the queue, by querying the queue view. I can also see that Oracle tried to call my callback procedure, because in the trace file I see the following:
    *** 2009-02-13 08:52:25.000
    *** ACTION NAME:() 2009-02-13 08:52:24.984
    *** MODULE NAME:() 2009-02-13 08:52:24.984
    *** SERVICE NAME:(SYS$USERS) 2009-02-13 08:52:24.984
    *** SESSION ID:(609.3387) 2009-02-13 08:52:24.984
    Error in PLSQL notification of msgid:4F7962FEDD3B41FA8D9538F0B38FCDD1
    Queue :"MTDX"."LOGMESSAGE_QUEUE"
    Consumer Name :DEFAULT_LOGGER
    PLSQL function :MTDX.PK_SYST_LOGMESSAGE.DefaultLoggerCallback
    : Exception Occured, Error msg:
    ORA-00604: Fout opgetreden bij recursief SQL-niveau 2.
    ORA-06550: Regel 1, kolom 7:
    PLS-00306: Onjuist aantal of type argumenten in aanroep naar 'DEFAULTLOGGERCALLBACK'..
    ORA-06550: Regel 1, kolom 7:
    PL/SQL: Statement ignored.
    So.. how many parameters does Oracle expect, and of what type? Is there any way to find out? What is wrong with my code?

    Ok, found it... I had defined the last parameter of the callback procedure as 'payload1' (that is: 'payload-ONE') instead of 'payloadl' ('payload-ELL'). It all works like a charm now.
    What a way to waste two whole days!

  • BPEL Process for AQ Exception Queue

    Is there a way to configure AQ adapter to dequeue message from default exception queue. I have tried doing so but it fails to find the exception queue. If not then what are the better ways of handling exception messages for a multiconsumer queue.
    I need to enqueue the messages from exception queue once the issue is resolved.
    -AA

    Any one who can help me on this ?
    -AA

  • Oracle AQ: Message not removed from source queue after propagation

    Hi.
    I have been playing around with a test setup for a "fanning out"-propagation system.
    I have created three queues, SRC_Q, DEST_Q and DEST2_Q.
    The propagation seems to work fine, the messages that I put on the SRC_Q get propagated to the destination queues. However, after propagation the message does not get removed from the source queue. Could anyone tell me why?
    I am using Oracle 10g.
    Here is my setup:
    --Test payload
    CREATE OR REPLACE TYPE test_payload AS OBJECT(
    test_id NUMBER,
    test_dt DATE);
    commit;
    DECLARE
    subscriber SYS.aq$_agent;
    BEGIN
    --- Create Originating Queue and start it
    DBMS_AQADM.create_queue_table( queue_table => 'SRC_MQT', queue_payload_type => 'Test_Payload',
    multiple_consumers => TRUE );
    DBMS_AQADM.create_queue( 'SRC_Q', 'SRC_MQT' );
    DBMS_AQADM.start_queue( queue_name => 'SRC_Q' );
    --- Create Destination Queue and start it
    DBMS_AQADM.create_queue_table( queue_table => 'Dest_MQT', queue_payload_type => 'Test_Payload',
    multiple_consumers => TRUE );
    DBMS_AQADM.create_queue( 'Dest_Q', 'Dest_MQT' );
    DBMS_AQADM.start_queue( queue_name => 'Dest_Q' );
    --- Create Destination Queue2 and start it
    DBMS_AQADM.create_queue_table( queue_table => 'Dest2_MQT', queue_payload_type => 'Test_Payload',
    multiple_consumers => TRUE );
    DBMS_AQADM.create_queue( 'Dest2_Q', 'Dest2_MQT' );
    DBMS_AQADM.start_queue( queue_name => 'Dest2_Q' );
    --- Add Subscribers and schedule propagation
    subscriber := SYS.aq$_agent( 'test_sub', 'Dest_Q', NULL );
    DBMS_AQADM.add_subscriber( queue_name => 'SRC_Q', subscriber => subscriber , queue_to_queue=> TRUE);
    subscriber := SYS.aq$_agent( 'test_sub2', 'Dest2_Q', NULL );
    DBMS_AQADM.add_subscriber( queue_name => 'SRC_Q', subscriber => subscriber , queue_to_queue=> TRUE );
    --Propagation to queues
    DBMS_AQADM.schedule_propagation( queue_name => 'SRC_Q', destination_queue => 'Dest_Q' );
    DBMS_AQADM.schedule_propagation( queue_name => 'SRC_Q', destination_queue => 'Dest2_Q' );
    commit;
    END;
    --Put something on the queue
    DECLARE
    message_handle RAW( 16 );
    MESSAGE test_payload;
    nq_opt dbms_aq.enqueue_options_t;
    nq_pro dbms_aq.message_properties_t;
    begin
    nq_opt.visibility := dbms_aq.immediate;
    nq_pro.expiration := dbms_aq.never;
    MESSAGE := test_payload( 2, SYSDATE );
    DBMS_AQ.enqueue( 'SRC_Q', nq_opt,nq_pro,MESSAGE, message_handle );
    COMMIT;
    END;
    I am really stuck with this problem so I really hope somebody have some advice on what I am doing wrong.

    I am also facing a similar issue. I have a multiconsumer queue. The message has been dequeued but the message is still present in the queue table and the message is also present in AQ$<queue_name> and the state is being shown as 'processed'.
    This all was working fine few days back and somehow stopped working all of sudden. The DB version which I am using is - 11.1.0.7.0. Any help related to this will be greatly appreciated
    -AA

  • Dequeued messages not deleted from one queue but other works

    Hi,
    I have a multiconsumer queue with two local subscribers.
    The messages go to the 'PROCESSED' state but do not get
    deleted from the queue table.
    As a test, I created another single consumer queue in a different andqueue table, but the oracle deleted the 'PROCESSED' messages as expected.
    In the multiconsumer queue, the messages are added by a trigger on the table. The enqueued messages varies from 100000 to 10000 per hour.
    aq_tm_processes = 5
    job_queue_processes=4
    What else can I do debug the problem?
    Is there any log file on the database server that I can
    look at any potential problem.
    I would appreicate any responses. This could very well
    be a newbie problem. I have not worked on advanced queues
    before and nor has anyone else in our system.
    Thanx,
    HB.

    I forgot to add that I am using default retention time
    and when I query user_queue the retention time is set to zero for the multiconsumer queue.

Maybe you are looking for

  • How to share iphoto with two users in the same imac maverick

    I can´t find the way to share iphoto/itunes with two users in the same imac with maverick software

  • Multihead - Multiheadache... displaymanager messes up xrandr

    Hi guys I have been messing around with my X config for a few days now, it would be great is anyone of you has an idea on how to fix it. Here is my setup: 2 Graphics gards: 1st one is an NVIDA gtx 770, 2nd one is an AMD Radeon HD 6450 4 Displays conn

  • Slide Timing / Advancing Question

    Hi All, I'm relatively new to Captivate (using version 6) and I've been looking all over to find an answer to this question. Basically, I am creating an interactive user guide, and I have certain slides with clickable buttons that display text captio

  • Call of duty ghosts trade in offer

    Is it still valid today? I heard about it and for some reason I can't click on the offer when looking at advanced warfare on my phone. Thanks guys Solved! Go to Solution.

  • Backward compatibility of CS6 files

    I have Photoshop CS5 for Windows (version 12.1 x32), and I'm trying to open a CS6 file that was sent to me.  When I do, none of the text layers are editable.  Is this expected? Is there any way to fix it?