Dequeue from multi consumer queue without consumer_name

Are there any way to efficient emptying a multiconsumer queue where mesages by sender are taged with consumer_name, and there are multiple consumers?

Christian,
I have the same question. Have you got any answer or found out any good solution?
Thx!

Similar Messages

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

  • Retry counts on multi consumer queues in Java

    Is there a way to get the retry count of a message that has been dequeued from a multiconsumer queue? I believe we were able to access the retry count of a message on a single consumer queue, but when dequeuing from a multiconsumer queue, the retry count field is not filled with a value.
    Can this be done?

    Is there a way to get the retry count of a message that has been dequeued from a multiconsumer queue? I believe we were able to access the retry count of a message on a single consumer queue, but when dequeuing from a multiconsumer queue, the retry count field is not filled with a value.
    Can this be done?

  • How to send message to a multi-consumer queue using pl/sql

    How to send message to a multi-consumer queue using pl/sql ? Thanks.
    I tried following, but got an message: no receipient specified.
    DBMS_AQ.ENQUEUE(
    queue_name => 'aqadm.multi_queue',
    enqueue_options => queue_options,
    message_properties => message_properties,
    payload => my_message,
    msgid => message_id);
    COMMIT;
    END;
    /

    Here's two way to enqueue/publish new message into multi-consumer queue.
    (1) Use explicitly declared recipient list
    - Specify "Recipients" by setting recipient_list to messge_properties, before ENQUEUE().
    DECLARE
    recipients DBMS_AQ.aq$_recipient_list_t;
    BEGIN
    recipients(1) := sys.aq$_agent('RECIPIENTNAME',NULL,NULL);
    message_properties.recipient_list := recipients ;
    (2)Or, declare subscriber list permanently. Then you need not to specify recipient list each time you call ENQUEUE().
    begin
    dbms_aqadm.add_subscriber(
    queue_name=>'YOURQUEUE',
    subscriber=> sys.aq$_agent('RECIPIENTNAME', null, null)
    end;
    You can add 1024 local subscriber include maximum 32 remote-queue-consumer to one queue.

  • PL/SQL Callback registered on multi consumer queue takes 6 seconds to call

    Registered a PL/SQL callback procedure on multi consumer Queue. if I enqueue message into queue, it takes 6 seconds to call PL/SQL callback procedure.
    Why does it takes 6 seconds ?
    I believe Queue submits DBMS Job to execute the Callback. I am not sure why it is taking 6 seconds to execute the callback.
    are there any configarable parameters to set which allows callbacks to be executed more frequently?

    You can try to change jobqueue_interval=1      
    This is a scan rate interval (seconds) of job queue parameter.
    it is 5 sec by default.
    Regards,
    Sergey

  • Notify when message arrives in multi-consumer queue in Oracle 8i

    Hi,
    Is there any way by which we can get notified whenever a new message arrives in the multi-consumer queue ?
    Thanks,
    Shailesh

    Probably a better shot of an answer in the AQ forum.
    Advanced Queueing

  • 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

  • Multi-consumer queue table does not empty

    Hello,
    I must be missing something pretty trivial here but I have setup queue with a queue table where multiple_consumers = true. When I dequeue a message from the queue it is received, but the message is still left in the queue table. When I do a second dequeue I get a end-of-fetch error.
    Currently, there is only one subscriber and the subscriber is specified as the recipient of the message.
    How do I get the messages removed from the queue table?
    DECLARE
        queue_options       DBMS_AQ.ENQUEUE_OPTIONS_T;
        message_properties  DBMS_AQ.MESSAGE_PROPERTIES_T;
        recipients          DBMS_AQ.AQ$_RECIPIENT_LIST_T;
        message_id          RAW(16);
        my_message          MYRESP_T;
    BEGIN
        recipients(1) := sys.aq$_agent('MY_SUBSCRIBER',null,null);
        message_properties.recipient_list := recipients;
        my_message := MYRESP_T('99293','ORCL','TEST');
        DBMS_AQ.ENQUEUE(
            queue_name => 'RESP_Q',
            enqueue_options => queue_options,
            message_properties => message_properties,
            payload => my_message,
            msgid => message_id);
        COMMIT;
    END;
    DECLARE
            r_dequeue_options    DBMS_AQ.DEQUEUE_OPTIONS_T;
            r_message_properties DBMS_AQ.MESSAGE_PROPERTIES_T;
            v_message_handle     RAW(16);
            o_payload                 MYRESP_T;
            v_dynamic_sql           VARCHAR2(4000);
            BEGIN
                r_dequeue_options.wait := DBMS_AQ.NO_WAIT;
                r_dequeue_options.dequeue_mode := DBMS_AQ.REMOVE;
                r_dequeue_options.navigation := DBMS_AQ.FIRST_MESSAGE;
                r_dequeue_options.consumer_name := 'MY_SUBSCRIBER';
                DBMS_AQ.DEQUEUE(
                    queue_name         => 'RESP_Q',
                    dequeue_options    => r_dequeue_options,
                    message_properties => r_message_properties,
                    payload            => o_payload,
                    msgid              => v_message_handle
              commit;
            END;Thanks in advance

    Presumably the message gets left on the Q with a state of PROCESSED? If so then that suggests you have aq_tm_processes explicitly set to 0 (zero) in your spfile/pfile - these background processes clear messages which have been PROCESSED.
    If this is not the case can you post the state of the messages and some more information like version and AQ related parameters?
    Thanks
    Paul

  • Muti Consumer Queue creation

    Hi everyone,
    While creating multi consumer queue, I have encountered with below error:
    SQL> Begin
    2 DBMS_AQADM.Create_Queue_Table(Queue_Table => 'qtbl_NearTime',
    3 Queue_Payload_Type => 'NearTime',
    4 Sort_List => Null,
    5 Multiple_Consumers => True,
    6 Storage_Clause => 'TABLESPACE USERS');
    7 end;
    8 /
    Begin
    DBMS_AQADM.Create_Queue_Table(Queue_Table => 'qtbl_NearTime',
    Queue_Payload_Type => 'NearTime',
    Sort_List => Null,
    Multiple_Consumers => True,
    Storage_Clause => 'TABLESPACE USERS');
    end;
    ORA-08103: object no longer exists
    ORA-06512: at "SYS.DBMS_AQADM_SYS", line 2224
    ORA-06512: at "SYS.DBMS_AQADM", line 58
    ORA-06512: at line 2
    I am working with Oracle 9i. Please advice.
    Many thanks in advance.
    Prabha

    You'll have better-er luck in the AQ forum.
    Advanced Queueing

  • Consuming queue from multiple processes

    We have a program designed to consume a queue with consumer name set to "consumer". Here's how it dequeues messages:
    dequeue_options.consumer_name := 'Consumer';
    dequeue_options.navigation := DBMS_AQ.FIRST_MESSAGE;
    dequeue_options.WAIT := 10;
    DBMS_AQ.DEQUEUE(queue_name => 'ourschema.our_que',
    dequeue_options => dequeue_options,
    message_properties => message_properties,
    payload => message,
    msgid => message_handle);
    If we run one instance of this program this dequeue operation above uses 10 CPU seconds over the duration of our load test. If we run two instances of the program (which consumes the same queue as the same consumer) then the dequeue operation above uses 160 CPU seconds. We need the second instance to remove a single point of failure but the 16 fold increase in load on our database is not acceptable for a dequeue operation.
    Why is it so expensive to have two processes dequeuing from our_queue using the same consumer name?
    thanks
    Dale

    We managed to solve the problem.
    We had initiated a transaction to bracket the dequeue and a subsequent insert. Removing the transaction seems to have removed the performance hit from the second process.

  • Dequeue   elements from an  apply - queue table

    hi Everyone?
    I'm tried dequeue elements from a queue table. This one, is associated to an apply streams process. I'd wrote this procedure to test a manual dequeue, but this error message appears :
    ORA-25228: timeout or end-of-fetch during message dequeue from STADMIN.Q_APP_SELECTS_FROM_CRM
    The queue is not empty
    Help me please... thank you
    The Procedure code is:
    create or replace procedure str_clean_queue (cola in varchar2, tabla in varchar2, comando in varchar2) is
    next_trans EXCEPTION;
    pragma exception_init (next_trans, -25235);
    no_messages EXCEPTION;
    pragma exception_init (no_messages, -25228);
    dequeueOpt dbms_aq.dequeue_options_t;
    message_properties dbms_aq.message_properties_t;
    message SYS.ANYDATA;
    msgid raw(16);
    newMess boolean;
    lcr SYS.LCR$_ROW_RECORD;
    a number :=0;
    begin
    dequeueOpt.CONSUMER_NAME := 'APP_SELECTS_FROM_CRM';
    dequeueOpt.DEQUEUE_MODE := DBMS_AQ.LOCKED;
    dequeueOpt.NAVIGATION := DBMS_AQ.FIRST_MESSAGE;
    dequeueOpt.VISIBILITY := DBMS_AQ.IMMEDIATE;
    dequeueOpt.WAIT :=10;
    dequeueOpt.MSGID := null;
    newMess:=True;
    while (newMess) loop
    begin
    DBMS_AQ.DEQUEUE (
    queue_name => 'STADMIN.'|| cola,
    dequeue_options => dequeueOpt,
    message_properties => message_properties,
    payload => message,
    msgid => msgid);
    -- analizamos lo que llego en el payload
    lcr := DBMS_STREAMS.CONVERT_ANYDATA_TO_LCR_ROW(message);
    if (lcr.get_command_type = comando AND
    lcr.get_object_name = tabla AND
    lcr.get_object_owner = 'DBADMIN') then
    -- hacer desaparecer el lcr de la cola
    dequeueOpt.DEQUEUE_MODE := DBMS_AQ.REMOVE;
    dequeueOpt.MSGID := msgid;
    DBMS_AQ.DEQUEUE (
    queue_name => 'STADMIN.'|| cola,
    dequeue_options => dequeueOpt,
    message_properties => message_properties,
    payload => message,
    msgid => msgid);
    a:=a+1;
    end if;
    dbms_output.put_line(a);
    exception
    WHEN next_trans THEN
    dequeueOpt.navigation := DBMS_AQ.NEXT_TRANSACTION;
    WHEN no_messages THEN
    dbms_output.put_line(sqlerrm);
    newMess := FALSE;
    end;
    end loop;
    end str_clean_queue;

    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

  • How to pick(or consume) messages from Woblogic JMS Queue only when DB is UP

    Hi,
    I have a requirement to pick(or consume) messages from Woblogic JMS Queue only when DB is UP.
    When DB is down, messages should remain in queue. When DB is up, messaged should be picked on scheduler basis.
    We are using SOA suite 11g(BPEL or mediator,JMS Adapter).
    What is the best way to achive it in SOA 11g.
    I tried, but when I setup a Consumer, there is no control over there. Messages are picked automatically.
    Please advise.
    Thanks
    Ram

    something wrong with the design.
    why dont you set the retry options in the fault policies?
    So if the external DB is down you could reprocess them after specified interval or make it go to human retry queue.
    Then you could use SOA api to retry all of them.
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

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

  • Any way t read a message from a Queue without actually removing it

    Hello friends,
    Can anyone please tell me , is there any way to read contents of TextMessage from a Queue, without actually removing it from Queue using receive method

    You can use a QueueBrowser to get an Enumeration of the messages in the queue.

  • Creating job to listen to single consumer queue

    i have code that will allow a job to listen on a queue for a mulitple consumer queue but was wondering how to change it for a single consumer queue. The code i currently have for the multiple conusmer looks like this
         DBMS_SCHEDULER.DEFINE_METADATA_ARGUMENT(
              program_name => 'P_ToDBlocking_Implement'
              ,argument_position => 1
              ,metadata_attribute => 'EVENT_MESSAGE'
         dbms_scheduler.enable('P_ToDBlocking_Implement');
         DBMS_SCHEDULER.CREATE_EVENT_SCHEDULE (
              schedule_name =>      'S_ToDBlocking_Implement'
              ,start_date =>      systimestamp
              ,event_condition => 'corrid=''NOTIFY'''
              ,queue_spec => 'event_msg_q');
    Maybe i am thinking about this wrong how could i get a consumer in a single consumer queue to listen to the queue and process all queue that come in?
    Edited by: user457357 on Sep 12, 2008 12:19 AM

    Why don't you step back, post your full version number, and explain what the business process is. In other words what it is you are trying to achieve.
    When discussing business processes you don't write code. You don't name methodologies. You say things like.
    An end user adds a new row into a table and when that happens I want a job to run .... or something like that.
    Without a context any answer is pure guesswork.

Maybe you are looking for

  • How to enter my password after replacing keyboard batteries

    I have just replaced the batteries in my keyboard (first time I've done this). The Mac was asleep and needs a password to wake up, but the keyboard "pairing needed" light is flashing and I cannot enter the password as the keyboard cannot transmit to

  • Getting SC details using Backend Purchase Order

    Hi Friends, I am running a report in backend (R/3), I want to get shopping cart details from SRM simply by passing backend <b>purchase order number.</b> Can you suggest me a function module in SRM side please? Regards. Pras

  • ORA-00119,ORA-00132 during duplicate target database for standby in 11gR2

    I am running duplicate target database for standby from active database command from RMAN. I went thru step-by-step on how to create a standby database from the textbook i got from my Oracle Univ. 11g Data Guard course. I set up all the listener.ora

  • SQLExec to Remote Citadel db...

    I am trying to connect to a remote citadel db to verify that the service is still active. We have been having some problems with the Citadel db shutting down because of very large ALE file. The only thing that I found to monitor this situation is to

  • Are your cc product really up to date? Some bugs in Creative Cloud should be noticed

         Hello there, I have been using cc for two weeks already. I found there is such a delay when i using indesign cc ver.9.0  in OSX10.9 Adobe suggests that you should update your indesign cc to the latest version which is 9.2. But Creative Cloud tel