Dequeue from exception queue failing

i'm having trouble dequeueing a message that has been moved to the exception queue. i can 'see' the message by looking at the queue table using Toad, but any attempt to dequeue it using DBMS_AQ.DEQUEUE results in the procedure timing out without dequeuing the message. when i try to dequeue it explicitly, using the ID, the process hangs. either way, there are no error messages.
i'm using the default exception queue, which i have started and enabled for dequeue.
thanks in advance for any help, simon

after banging my head on the wall for three days, a shutdown and restart of the database solved this problem....

Similar Messages

  • Dequeue from Advanced Queue

    Hi All,
    I have used the DBMS_AQ package provided dequeue functionality for dequeuing msgs from my advanced queue. Now there is a job which dequeue the items from this queue and sends out email. Now what is happening is the job picks up an item from the advanced queue for dequeuing and sends out email, but the item which is picked up still remains in the queue and is not dequeued. As the job runs every minute and polls the queue, it again picks up the same queue item and sends the email. This process repeats for 5-6 times and then the queue message expires. My requirement is that, the job should dequeue the item from the queue and just send email once. Please can anyone suggest what could be the solution to this problem?

    10g is not a version number it is a marketing label that applies equally to 10.1.0.2 and 10.2.0.4 and a lot of versions in between.
    That said I know this demo I wrote works in all versions of 10.2:
    http://www.psoug.org/reference/aq_demo1.html
    Compare it to what you are doing.

  • Dequeue from JMS Queue 10 at a time and process it.

    Hi,
    I have created a JMS queue in weblogic.
    Say i enqueue 1000 records in the queue at one go.
    Now, i want a bpel process to dequue from it and process it.
    However as per my requirement i want at a time 10 instances being active at a time i.e. 10 records from the queue are being processed at a time.
    Once any one of them finishes, the other will pick up the message.
    1 BPEL instance will process only 1 record from Q at a time
    Please let me know how to achieve this.

    You need to understand here that it is adapter which deques the message from queue and it will deliver it to BPEL for processing which is an async process. So adapter will keep dequeing messages and keep publishing it to BPEL irrespective of whether BPEL process has completed processing.
    You may need to tweak the adapter configuration here. First of all create the synchronous BPEL composite so that both adapter and BPEL work in same transaction -
    https://blogs.oracle.com/adapters/entry/creating_a_synchronous_bpel_composite_using_file_adapter
    You may control the number of threads for inbound JMS adapter using binding property "adapter.jms.receive.threads" in composite.xml
    Regards,
    Anuj

  • Dequeue from an exception queue

    Hi,
    I am very new to oracle AQ and trying dequeuing of message from an exception queue. I have created a procedure for dequeuing a message from exception queue and is working fine. I have to execute this procedure manually each time a message is moved to the exception queue. Is there any mechanism to call this procedure automatically each time the message is moved to exception queue? Please help.
    Thanks in Advance
    Lokesh

    Hello,
    as you wrote you already have a code snippet with DBMS_AQ.DEQUEUE of an exception queue.
    Wrap this DEQUEUE in an infinite loop (LOOP ... END LOOP). In order to have this procedure as an autonomous session
    you can start it as a database job:
    DECLARE
       v_jobno NUMBER(6);
    BEGIN
        DBMS_JOB.SUBMIT( v_jobno,
                        'BEGIN <your module>; END;',
                        SYSDATE, NULL );
        COMMIT;
    END;
    /Kind regards,
    WoG

  • 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

  • Remove exception queue

    I am new to AQ. We are using Oracle 11.2.0.3. We will be implementing Normal single subscriber queue. We will be using exisiting error logging table to hadle exception . So exception queue would be redundant for our workflow.
    1) Is is possible to create Queue without exception queue?
    2) Can we use queue by disabling its exception queue?
    3) How can we remove/expire message from exception queue as soon as it enqueued?
    Appreciate your input. Thanks.

    Hello,
    1) Is is possible to create Queue without exception queue?
    When you create a queue table you always get a default exception queue and there should always be at least one exception queue in a queue table. When you create normal queue an exception queue is not created just the normal queue
    2) Can we use queue by disabling its exception queue?
    I am not clear on what you are asking with regard to this question. If you enqueue a message into a normal queue and it needs to be moved to the exception queue a queue monitor slave process will move the message from the normal queue to the exception queue. You can only enable an exception queue for dequeue. You cannot prevent a message from being placed on the exception queue if it is appropriate for the system to do this.
    3) How can we remove/expire message from exception queue as soon as it enqueued?
    You can setup AQ PL/SQL Notification to process any messages which are placed in the default exception queue or use DBMS_AQ.Listener to listen for enqueued messages into the exception queue.
    Thanks
    Peter

  • Dequeue with OCCI does not remove the message from the queue

    Hey there,
    I have this problem where no matter what dequeue option I try the messages never seem to be removed from the queue... I tried looking around and found only a similar un-answered question...
    Thanks in advance...
    void TryAnydataDequeue(oracle::occi::Connection * conn)
         try
              std::cout << "Dequeue Commence..." << std::endl;
              Consumer cons(conn);
              //Settings de dequeue
              cons.setCorrelationId("SPPC");
              cons.setQueueName("Anydata_queue");
              cons.setConsumerName("SNOOP");
              cons.setDequeueMode(cons.DEQ_REMOVE);
              //cons.setDequeueMode(cons.DEQ_LOCKED);
              std::cout << "Reception du message..." << std::endl;
              Message m2 = cons.receive(Message::ANYDATA);
              AnyData any(conn);
              any = m2.getAnyData();
              if(!any.isNull())
                   oracle::occi::TypeCode type = any.getType();
                   if(type == OCCI_TYPECODE_VARCHAR2)
                        std::string msg = any.getAsString();
                        std::cout << "Message Reçu: ";
                        std::cout << msg << std::endl;
                   else
                        std::cout << "Format du message invalide..." << std::endl;
                   std::cout << "Fin du message... (Press a key)" << std::endl;
              else
                   std::cout << "Message invalide..." << std::endl;
              System::String * theInput = System::Console::ReadLine();
         catch(SQLException ex)
              std::cout << "Exception: " << ex.getErrorCode() << " - " << ex.getMessage() << std::endl;
              System::String * tnput = System::Console::ReadLine();
    }

    The message from the queue will be removed when you do a commit after a successful dequeue call, depending upon your message retention settings.
    After you have done this processing and successfully performed a commit, what is the output of the following query:
    SQL> connect AQADMIN/password
    SQL> select msg_state from aq$<your_queue_table_name_goes_here> ;?
    If it is PROCESSED, check your queue retention settings.
    Additionally, make sure that the init.ora parameter AQ_TM_PROCESSES is set to a NON-ZERO value for this to happen.

  • Dequeue from multi consumer queue table

    Hi,
    Even after all consumers I created have dequeued the messages (in REMOVE mode), they just didn't go from the queue table. Although my application works fine (the messages could no longer be dequeued again), I am afraid this will affect performance when messages piled up in Q table.
    I tried maunally delete the records in Q table. But the question is "is there an automatic way to handle this?"
    Thx for any feedback!

    Make sure that the init.ora parameter AQ_TM_PROCESSES is set to 1 or more. This is the parameter that controls the number of processes available to clean up the queue after the messages have been dequeued or the message has expired.

  • Dequeueing message from xmltype queue

    I have the queue build upon the XMLType (too complex to use it as a payload). When I'm trying to dequeue messages with ESB AQ Adapter they are not passing through. When building the service adapter I've specified the same schema file as destination payload type so it's rather impossible to have any differences. Is it necessary to do anything special (transformations or so) to make it working ?

    This is not a supported feature. The best solution is to write a java callout to pull the message from the queue.
    Gregory Haardt
    ALSB Prg. Manager
    [email protected]
    Edited by ghaardt at 09/11/2007 4:00 PM

  • Problems enqueuing a CLOB on JMS_TEXT queue and dequeue from JMS

    Hi, I have a PL/SQL procedure that enqueues in a JMS_TEXT queue a CLOB, and a MDB in J2EE reading messages from that queue. The problem is that text from dequeued messages appears as null in java, but if I send messages to the queue using Varchar2 I get the correct message. What's wrong?? Thanks.

    Hi,
    I encountered the same problem. The fix was to use a more recent aqapi13.jar:
    if last modification date is 22th April 2002, then it does not read CLOB content.
    if last modification date is 14th October 2004, then it does read CLOB content.
    Note I am using Oracle 9i Release 2.

  • 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.

  • Message not moving to default exception queue when max retries reached

    Hi
    I've set up an advanced queue with max retrie of 5 but when the dequing fails the retry count increments but it never goes to the exception queue. The retry count stays at 6, msg_state = READY, deq_txn_id = RETRY_EXCEEDED. Any ideas?
    -- drop queue if it exists
    exec dbms_aqadm.stop_queue (queue_name => 'AQ$_JY_METER_ENABLE_QTAB_E');
    exec dbms_aqadm.stop_queue (queue_name => 'JY_METER_ENABLE_QUE');
    exec dbms_aqadm.drop_queue (queue_name  => 'JY_METER_ENABLE_QUE') ;
    exec dbms_aqadm.drop_queue_table( queue_table => 'JY_METER_ENABLE_QTAB');
    -- create the payload for the messages
    CREATE TYPE jy_meter_enablement_typ AS OBJECT
    request_id                VARCHAR2(30) ,
    request_system_code       VARCHAR2(20) ,
    business_process_ref      VARCHAR2(20) ,
    request_type_ref          VARCHAR2(20) ,
    meter_serial_number       VARCHAR2(10) ,
    message_request_content   CLOB
    -- Create queue table.
    -- This one has a sort list so items will be enqueued first based on priority and then based on enq_time
    BEGIN
       dbms_aqadm.create_queue_table (queue_table        => 'JY_METER_ENABLE_QTAB',
                                      queue_payload_type => 'JY_METER_ENABLEMENT_TYP',
                                      multiple_consumers => TRUE ,
                                      sort_list          => 'priority,enq_time' ,
                                      comment            => 'Queue table to handle JY Meter Enablement messages');
    END;
    -- Create Queue based on table
    BEGIN
      -- retention time set 3600 seconds (ie 1 hour) so the message is kept on the queue for 1 hour after it has been dequeued.
       dbms_aqadm.create_queue (queue_name     => 'JY_METER_ENABLE_QUE',
                                queue_table    => 'JY_METER_ENABLE_QTAB' ,
                                max_retries    => 5 ,
                                retry_delay    => 2 ,
                                retention_time => 3600 ,
                                comment     => 'Queue to handle JY Meter Enablement messages in priority/enq_time order');
    END;
    -- start the queue
    BEGIN
    dbms_aqadm.start_queue (queue_name => 'JY_METER_ENABLE_QUE');
    END ;
    -- Add and register a subscriber to the queue to run the Dequeue procedure
    BEGIN
       dbms_aqadm.add_subscriber (queue_name => 'EMO_METER_MGMT.JY_METER_ENABLE_QUE',
                                  subscriber => SYS.AQ$_AGENT('JY_METER_ENABLE_QUE_SUBSCRIBER',
                                                              NULL,
                                                              NULL )
        dbms_aq.register (SYS.AQ$_REG_INFO_LIST(SYS.AQ$_REG_INFO('JY_METER_ENABLE_QUE:JY_METER_ENABLE_QUE_SUBSCRIBER',
                                                                 DBMS_AQ.NAMESPACE_AQ,
                                                                 'plsql://EMO_METER_MGMT.DEQUEUE.dequeue_jy_request',
                                                                 HEXTORAW('FF'))),1);
    END;
    -- start the default exception queue
    BEGIN
    dbms_aqadm.start_queue(queue_name => 'EMO_METER_MGMT.AQ$_JY_METER_ENABLE_QTAB_E',
                            enqueue => FALSE,
                            dequeue => TRUE);
    END ;
    /Thanks

    Sorry, forgot to add db version
    select banner from v$version/
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE 11.2.0.2.0 Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    5 rows selected.

  • Consume exception queue messages (Topic)

    Hi,
    Context : 1 topic - 2 consumers (BPEL consumers) A and B.
    If A fails to consume a message, this message is sent to the exception queue even if B managed to consume it.
    It's normal.
    If I move this message from the exception queue to the original queue, it will be consumed by A and again by B.
    Is it normal ?
    I expected that the message would be only consumed by A ...
    Is it possible ?
    Thanks,
    romain.

    i ll answer my question
    first set exception queue dequeue enable
    BEGIN
    dbms_aqadm.start_queue(queue_name => 'aq$_request_qt_e',dequeue => TRUE,enqueue => FALSE);
    END;
    then dequeue messages with null consumer name ;)

  • Error while trying to pick message from weblogic queue

    Hi,
    We are getting the following error while trying to connect to pick up a message from weblogic queue.
    We are suing oracle soa suite 10.1.3.1 and weblogic 8.1
    the bad part is that, this error is not documented anywhere and couldn't get much help on this.
    Would appreciate any suggestions / pointers on this.
    Let me know if any further information is required.
    invoke failed
    org.collaxa.thirdparty.apache.wsif.WSIFException: file:/E:/product/10.1.3.1/OracleAS_4/bpel/domains/default/tmp/.bpel_OTOCBPELProcess_1.0_78fcf080ec2bd7495aebfb5373e76116.tmp/readmsg.wsdl [ Consume_Message_ptt::Consume_Message(opaque) ] - WSIF JCA Execute of operation 'Consume_Message' failed due to: ERRJMS_IX_WRONG_SPEC.
    Outbound interaction invoked with incorrect InteractionSpec.
    ; nested exception is:
    ORABPEL-12115
    ERRJMS_IX_WRONG_SPEC.
    Outbound interaction invoked with incorrect InteractionSpec.
    ---------------------------------------------------

    Hi!
    I am facing a similar issue, does someone have an idea ?
    <remoteFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>null</code>
    </part><part name="detail"><detail>null</detail>
    </part><part name="summary"><summary>file:/opt/oracle/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_TestReceiveMessage_BPEL_1.0_e00fd88d454889b871183d0d92dc9f7d.tmp/plReceiveMessage.wsdl [ Consume_Message_ptt::Consume_Message(TestPushMessage_BPELProcessRequest) ] - WSIF JCA Execute of operation 'Consume_Message' failed due to: ERRJMS_IX_WRONG_SPEC.
    Outbound interaction invoked with incorrect InteractionSpec.
    ; nested exception is:
         ORABPEL-12115
    ERRJMS_IX_WRONG_SPEC.
    Outbound interaction invoked with incorrect InteractionSpec.
    Please examine the log file to determine the problem.
    </summary>
    </part></remoteFault>
    Thanks,
    romain.

  • OC4J 9.0.4: Problem receiving message from JMS queue

    I've created an application which puts XML files in a JMS queue and try to get it out again. The enqueing (sending) is no problem, but when I dequeue from the same queue I receive nothing and if I don't specify a wait time the programs hangs.
    If I create a QueueBrowser I can see there are messages in the queue.
    Can someone tell me what I do wrong?
    Here is the code of my dequeue action:
    public String dequeue(int qName) throws RbsSysException
            final String method = "dequeue(int qName)";
            _log.debug(method);
            QueueConnection queueConnection = null;
            try
                queueConnection = _queueConnectionFactory.createQueueConnection();
                QueueSession queueSession = queueConnection.createQueueSession(false,
                        Session.AUTO_ACKNOWLEDGE);
                QueueReceiver queueRcv = queueSession.createReceiver(getQueue(qName));
                _log.debug("queue = "+ queueRcv.getQueue().getQueueName());
                // Due to bug 3376983 in OC4J We cannot use TextMessage if it exceeds
                // 64 kb. Therefore use ObjectMessage.
                Message msg = queueRcv.receiveNoWait();
                _log.debug("msg = " + msg);
                ObjectMessage objMsg = (ObjectMessage)msg;
                //ObjectMessage objMsg = (ObjectMessage) queueRcv.receiveNoWait();
                _log.debug("objMsg = " + objMsg);
                if (objMsg != null)
                    return (String) objMsg.getObject();
                else
                    return null;
            catch (JMSException je)
                throw new RbsSysException(je);
            finally
                if (queueConnection != null)
                    try
                        queueConnection.close();
                    catch (Exception any)
                        _log.error("Error while closing QueueConnection: ", any);
        }

    Did you implement javax.jms.MessageListener and the method onMessage(Message)?
    If you use onMessage() as wel as receive (or receiveNoWait() or receive(long)), the onMessage() can be called, while the main thread is blocking on a synchronous receive, so make sure you use only one of the two methods: onMessage() or receive.
    Receive() blocks your thread until a message is published. So your program 'hangs' by design. Usually this is used when your program is waiting for a particular message. Otherwise use onMessage().
    ReceiveNoWait() checks if something is in the queue at that very moment, so if nothing is there (yet), the main thread continues.
    Hope this helps,
    Lonneke

Maybe you are looking for

  • How to disable a single row of a multi-line text item

    I am trying to disable a date and a price on each row where the date is current or in the past (on theory the user can't update reference data that is in effect or past, only data which is not yet in use). It appears that forms 6i will make this an a

  • Identifying vendor text ,internal note fields

    hi gurus, iam not able to find vendor text and internal fields can u  pple just help me in dis matter. •     Internal Note (TDID = NOTE) : This field appears under “Document” tab of the PO at Item level. The value maintained in this field needs to be

  • Dynamic LOV in universe based report

    Hi, My question is simple. In Crystal Reports ,is it possible to have a dynamic LOV for the prompts when the report is based on universe? When ever the user chooses the drop down in prompt page, he should see only his values in LOV. This works in Web

  • Running OC4J from Jdev 10.1.3

    Hi, I get the following error message: Error initializing server: Unknown deployment root-tag attribute: xmlns:xsi when running my project from the latest version of JDeveloper 10.1.3 Developer Preview. Mukta

  • Using Copy Express to copy user profiles

    Hi Experts, I have two B1 2007 A databases running. Right now i need to move all the users in one of the DB unto the other one which already contains some users and their assigned authorizations. Kindly assist me  regarding which specific nodes to pi