Dequeueing messages in enqueue order

Is it possible to determine the order in which messages were enqueued when two or more processes are running concurrently and enqueueing messages to the same queue? In the FAQ section of the AQ documentation it states that if two or more messages are enqueued at the same time the STEP_NO column of the queue table can be used to determine the enqueue order. But apparently this only works when the messages are enqueued in the same queue session.
In my situtation I'm using Oracle8i Enterprise Edition Release 8.1.6.0.0 and I have two or more processes, each with its own queue session, enqueueing and dequeueing messages to the same queue. I have to be sure that the messages are dequeued in exactly the same order that they were enqueued. How do I determine the order that two messages with the same enqueue time were enqueued when each message was enqueued a in different queue session?
Thanks for your help.

Is it possible to determine the order in which messages were enqueued when two or more processes are running concurrently and enqueueing messages to the same queue? In the FAQ section of the AQ documentation it states that if two or more messages are enqueued at the same time the STEP_NO column of the queue table can be used to determine the enqueue order. But apparently this only works when the messages are enqueued in the same queue session.
In my situtation I'm using Oracle8i Enterprise Edition Release 8.1.6.0.0 and I have two or more processes, each with its own queue session, enqueueing and dequeueing messages to the same queue. I have to be sure that the messages are dequeued in exactly the same order that they were enqueued. How do I determine the order that two messages with the same enqueue time were enqueued when each message was enqueued a in different queue session?
Thanks for your help.

Similar Messages

  • Registered callback does not dequeue messages in order

    PROCEDURE notifycb(
    CONTEXT IN RAW,
    reginfo IN SYS.aq$_reg_info,
    descr IN SYS.aq$_descriptor,
    payload IN RAW,
    payloadl IN NUMBER )
    AS
    no_messages EXCEPTION;
    PRAGMA exception_init( no_messages, -25228 );
    dequeue_options dbms_aq.dequeue_options_t;
    message_properties dbms_aq.message_properties_t;
    msgid RAW( 16 );
    message XMLTYPE;
    BEGIN
    dequeue_options.consumer_name := descr.consumer_name;
    dequeue_options.msgid := descr.msg_id;
    dbms_aq.dequeue(
    descr.queue_name,
    dequeue_options, message_properties,
    message, msgid );
    INSERT INTO xmltest
    ( create_ts, enqueue_time, xml )
    VALUES
    ( systimestamp, message_properties.enqueue_time, message );
    EXCEPTION
    WHEN no_messages
    THEN NULL;
    END;
    BEGIN
    dbms_aq.REGISTER(
    SYS.aq$_reg_info_list(
    SYS.aq$_reg_info(
    'Q_TEST:QUEUE_SUBSCRIBER',
    dbms_aq.namespace_aq,
    'plsql://QUEUE_OWNER.NOTIFYCB?PR=1',
    HEXTORAW( 'FF' )
    , 1 );
    END;
    DECLARE
    v_enqueue_options dbms_aq.enqueue_options_t;
    v_message_properties dbms_aq.message_properties_t;
    v_message_handle RAW( 16 );
    xml XMLTYPE;
    BEGIN
    FOR x IN 1 .. 10 LOOP
    SELECT XMLELEMENT( "x", x ) INTO xml FROM dual;
    dbms_aq.enqueue(
    queue_name => 'QUEUE_OWNER.Q_TEST',
    enqueue_options => v_enqueue_options,
    message_properties => v_message_properties,
    payload => xml,
    msgid => v_message_handle );
    END LOOP;
    COMMIT;
    END;
    select * from xmltest
    order by create_ts;
    16-JUN-08 04.04.27.065311000 PM 06/16/2008 08:04:20 PM <x>4</x>
    16-JUN-08 04.04.27.078027000 PM 06/16/2008 08:04:20 PM <x>3</x>
    16-JUN-08 04.04.27.155730000 PM 06/16/2008 08:04:20 PM <x>5</x>
    16-JUN-08 04.04.27.268137000 PM 06/16/2008 08:04:20 PM <x>6</x>
    16-JUN-08 04.04.27.357706000 PM 06/16/2008 08:04:20 PM <x>7</x>
    16-JUN-08 04.04.27.479633000 PM 06/16/2008 08:04:20 PM <x>8</x>
    16-JUN-08 04.04.27.577086000 PM 06/16/2008 08:04:20 PM <x>9</x>
    16-JUN-08 04.04.27.612511000 PM 06/16/2008 08:04:20 PM <x>10</x>
    16-JUN-08 04.04.27.979631000 PM 06/16/2008 08:04:20 PM <x>2</x>
    16-JUN-08 04.04.28.084615000 PM 06/16/2008 08:04:20 PM <x>1</x>

    The solution I found is to use a loop to dequeue messages in order, rather than by the supplied msgid, and to use DBMS_LOCK to prevent the callbacks from processing messages in parallel.
    create or replace PROCEDURE notifycb(
    context IN RAW,
    reginfo IN SYS.aq$_reg_info,
    descr IN SYS.aq$_descriptor,
    payload IN RAW,
    payloadl IN NUMBER )
    AS
    no_messages EXCEPTION;
    PRAGMA exception_init( no_messages, -25228 );
    dequeue_options dbms_aq.dequeue_options_t;
    message_properties dbms_aq.message_properties_t;
    msgid RAW( 16 );
    message XMLTYPE;
    lockhandle VARCHAR2(128) := NULL;
    lockstatus NUMBER;
    BEGIN
    dequeue_options.consumer_name := descr.consumer_name;
    dequeue_options.wait := dbms_aq.no_wait;
    dbms_lock.allocate_unique( 'NOTIFYCB_LOCK', lockhandle );
    lockstatus := dbms_lock.request( lockhandle, DBMS_LOCK.X_MODE, release_on_commit => TRUE );
    IF lockstatus != 0 AND lockstatus != 4
    THEN
    RETURN;
    END IF;
    BEGIN
    LOOP
    dbms_aq.dequeue(
    descr.queue_name,
    dequeue_options, message_properties,
    message, msgid );
    INSERT INTO xmltest
    ( create_ts, enqueue_time, xml )
    VALUES
    ( systimestamp, message_properties.enqueue_time, message );
    END LOOP;
    EXCEPTION
    WHEN no_messages
    THEN NULL;
    END;
    COMMIT;
    END;

  • DEQUEUING ORDER DIFFERS FROM ENQUEUING ORDER,URGENT ONE, PLS HELP

    Hi ,
    we are using ORACLE ADVANCED QUEUING for queue functionality.
    our Oracle version is Oracle 8i release 8.1.5
    Sometimes dequeuing order differs from enqueuing order. we are
    enqueuing to the queue using default options only , i mean we
    are not setting any prriority for messages .We are enqueuing 100
    messages continuously to the queue.After completing enqueuing we
    are dequeuing from the queue first in browse and then in remove
    mode. We are using thin driver for database connectivity. If U
    have any idea about this problem pls feel free to share with me .
    Thanx in advance
    Regards
    Shilda Joseph
    see the code snippet
    enqueuing
    aqMsg = qOracleQueue.createMessage();
    aqRawPayload = aqMsg.getRawPayload();
    byMsg = sMsgInfo.getBytes();
    aqRawPayload.setStream(byMsg, byMsg.length);
    AQEnqueueOption aqEnqueueOption = new AQEnqueueOption
    qOracleQueue.enqueue(aqEnqueueOption, aqMsg);
    dequeuing
         aqDequeueOption.setWaitTime(1);
    aqDequeueOption.setDequeueMode
    (aqDequeueOption.DEQUEUE_BROWSE);
    aqMsg = qOracleQueue.dequeue(aqDequeueOption);
    //removing
         AQDequeueOption aqDequeueOption1 = new AQDequeueOption
    aqDequeueOption1.setDequeueMode
    (aqDequeueOption.DEQUEUE_REMOVE);
    AQMessage aqRemMsg = qOracleQueue.dequeue
    (aqDequeueOption1);
    see the enqueuing order and dequeuing order of hello 57, hello
    58
    2001/10/17 15:38:42:3 INFO [main] message enqueued - Helloo 1 to
    HL7MESSAGEQUEUE
    2001/10/17 15:38:42:124 INFO [main] message enqueued - Helloo 2
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:42:234 INFO [main] message enqueued - Helloo 3
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:42:334 INFO [main] message enqueued - Helloo 4
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:42:434 INFO [main] message enqueued - Helloo 5
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:42:544 INFO [main] message enqueued - Helloo 6
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:42:644 INFO [main] message enqueued - Helloo 7
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:42:755 INFO [main] message enqueued - Helloo 8
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:42:865 INFO [main] message enqueued - Helloo 9
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:42:965 INFO [main] message enqueued - Helloo 10
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:43:75 INFO [main] message enqueued - Helloo 11
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:43:175 INFO [main] message enqueued - Helloo 12
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:43:275 INFO [main] message enqueued - Helloo 13
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:43:375 INFO [main] message enqueued - Helloo 14
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:43:476 INFO [main] message enqueued - Helloo 15
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:43:576 INFO [main] message enqueued - Helloo 16
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:43:686 INFO [main] message enqueued - Helloo 17
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:43:786 INFO [main] message enqueued - Helloo 18
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:43:886 INFO [main] message enqueued - Helloo 19
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:43:986 INFO [main] message enqueued - Helloo 20
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:44:86 INFO [main] message enqueued - Helloo 21
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:44:187 INFO [main] message enqueued - Helloo 22
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:44:287 INFO [main] message enqueued - Helloo 23
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:44:397 INFO [main] message enqueued - Helloo 24
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:44:497 INFO [main] message enqueued - Helloo 25
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:44:597 INFO [main] message enqueued - Helloo 26
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:44:697 INFO [main] message enqueued - Helloo 27
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:44:797 INFO [main] message enqueued - Helloo 28
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:44:898 INFO [main] message enqueued - Helloo 29
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:44:988 INFO [main] message enqueued - Helloo 30
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:45:98 INFO [main] message enqueued - Helloo 31
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:45:188 INFO [main] message enqueued - Helloo 32
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:45:298 INFO [main] message enqueued - Helloo 33
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:45:388 INFO [main] message enqueued - Helloo 34
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:45:488 INFO [main] message enqueued - Helloo 35
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:45:598 INFO [main] message enqueued - Helloo 36
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:45:689 INFO [main] message enqueued - Helloo 37
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:45:799 INFO [main] message enqueued - Helloo 38
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:45:899 INFO [main] message enqueued - Helloo 39
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:45:989 INFO [main] message enqueued - Helloo 40
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:46:99 INFO [main] message enqueued - Helloo 41
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:46:189 INFO [main] message enqueued - Helloo 42
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:46:299 INFO [main] message enqueued - Helloo 43
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:46:390 INFO [main] message enqueued - Helloo 44
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:46:500 INFO [main] message enqueued - Helloo 45
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:46:600 INFO [main] message enqueued - Helloo 46
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:46:700 INFO [main] message enqueued - Helloo 47
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:46:790 INFO [main] message enqueued - Helloo 48
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:46:900 INFO [main] message enqueued - Helloo 49
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:47:0 INFO [main] message enqueued - Helloo 50
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:47:111 INFO [main] message enqueued - Helloo 51
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:47:201 INFO [main] message enqueued - Helloo 52
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:47:301 INFO [main] message enqueued - Helloo 53
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:47:411 INFO [main] message enqueued - Helloo 54
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:47:501 INFO [main] message enqueued - Helloo 55
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:47:631 INFO [main] message enqueued - Helloo 56
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:47:731 INFO [main] message enqueued - Helloo 57
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:47:822 INFO [main] message enqueued - Helloo 58
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:47:932 INFO [main] message enqueued - Helloo 59
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:48:22 INFO [main] message enqueued - Helloo 60
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:48:132 INFO [main] message enqueued - Helloo 61
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:48:222 INFO [main] message enqueued - Helloo 62
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:48:332 INFO [main] message enqueued - Helloo 63
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:48:432 INFO [main] message enqueued - Helloo 64
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:48:533 INFO [main] message enqueued - Helloo 65
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:48:623 INFO [main] message enqueued - Helloo 66
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:48:733 INFO [main] message enqueued - Helloo 67
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:48:823 INFO [main] message enqueued - Helloo 68
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:48:933 INFO [main] message enqueued - Helloo 69
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:49:23 INFO [main] message enqueued - Helloo 70
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:49:123 INFO [main] message enqueued - Helloo 71
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:49:214 INFO [main] message enqueued - Helloo 72
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:49:324 INFO [main] message enqueued - Helloo 73
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:49:684 INFO [main] message enqueued - Helloo 74
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:50:5 INFO [main] message enqueued - Helloo 75
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:50:105 INFO [main] message enqueued - Helloo 76
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:50:215 INFO [main] message enqueued - Helloo 77
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:50:305 INFO [main] message enqueued - Helloo 78
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:50:405 INFO [main] message enqueued - Helloo 79
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:50:505 INFO [main] message enqueued - Helloo 80
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:50:605 INFO [main] message enqueued - Helloo 81
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:50:696 INFO [main] message enqueued - Helloo 82
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:50:796 INFO [main] message enqueued - Helloo 83
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:50:886 INFO [main] message enqueued - Helloo 84
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:50:996 INFO [main] message enqueued - Helloo 85
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:51:96 INFO [main] message enqueued - Helloo 86
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:51:186 INFO [main] message enqueued - Helloo 87
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:51:286 INFO [main] message enqueued - Helloo 88
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:51:387 INFO [main] message enqueued - Helloo 89
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:51:487 INFO [main] message enqueued - Helloo 90
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:51:587 INFO [main] message enqueued - Helloo 91
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:51:687 INFO [main] message enqueued - Helloo 92
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:51:797 INFO [main] message enqueued - Helloo 93
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:51:887 INFO [main] message enqueued - Helloo 94
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:51:987 INFO [main] message enqueued - Helloo 95
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:52:88 INFO [main] message enqueued - Helloo 96
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:52:188 INFO [main] message enqueued - Helloo 97
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:52:278 INFO [main] message enqueued - Helloo 98
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:52:378 INFO [main] message enqueued - Helloo 99
    to HL7MESSAGEQUEUE
    2001/10/17 15:38:52:478 INFO [main] message enqueued - Helloo
    100 to HL7MESSAGEQUEUE
    2001/10/17 15:54:51:259 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 1
    2001/10/17 15:54:51:319 INFO [main] DS::run: Dequeue
    REMOVEHelloo 1
    2001/10/17 15:54:51:619 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 2
    2001/10/17 15:54:51:649 INFO [main] DS::run: Dequeue
    REMOVEHelloo 2
    2001/10/17 15:54:51:929 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 3
    2001/10/17 15:54:51:960 INFO [main] DS::run: Dequeue
    REMOVEHelloo 3
    2001/10/17 15:54:52:290 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 4
    2001/10/17 15:54:52:360 INFO [main] DS::run: Dequeue
    REMOVEHelloo 4
    2001/10/17 15:54:52:640 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 5
    2001/10/17 15:54:52:671 INFO [main] DS::run: Dequeue
    REMOVEHelloo 5
    2001/10/17 15:54:52:951 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 6
    2001/10/17 15:54:52:971 INFO [main] DS::run: Dequeue
    REMOVEHelloo 6
    2001/10/17 15:54:53:301 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 7
    2001/10/17 15:54:53:321 INFO [main] DS::run: Dequeue
    REMOVEHelloo 7
    2001/10/17 15:54:53:672 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 8
    2001/10/17 15:54:53:692 INFO [main] DS::run: Dequeue
    REMOVEHelloo 8
    2001/10/17 15:54:56:926 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 9
    2001/10/17 15:54:56:946 INFO [main] DS::run: Dequeue
    REMOVEHelloo 9
    2001/10/17 15:54:57:257 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 10
    2001/10/17 15:54:57:277 INFO [main] DS::run: Dequeue
    REMOVEHelloo 10
    2001/10/17 15:54:57:557 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 11
    2001/10/17 15:54:57:627 INFO [main] DS::run: Dequeue
    REMOVEHelloo 11
    2001/10/17 15:54:57:918 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 12
    2001/10/17 15:54:57:938 INFO [main] DS::run: Dequeue
    REMOVEHelloo 12
    2001/10/17 15:54:58:268 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 13
    2001/10/17 15:54:58:278 INFO [main] DS::run: Dequeue
    REMOVEHelloo 13
    2001/10/17 15:54:58:569 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 14
    2001/10/17 15:54:58:589 INFO [main] DS::run: Dequeue
    REMOVEHelloo 14
    2001/10/17 15:54:58:869 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 15
    2001/10/17 15:54:58:959 INFO [main] DS::run: Dequeue
    REMOVEHelloo 15
    2001/10/17 15:54:59:260 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 16
    2001/10/17 15:54:59:280 INFO [main] DS::run: Dequeue
    REMOVEHelloo 16
    2001/10/17 15:54:59:600 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 17
    2001/10/17 15:54:59:620 INFO [main] DS::run: Dequeue
    REMOVEHelloo 17
    2001/10/17 15:54:59:911 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 18
    2001/10/17 15:54:59:931 INFO [main] DS::run: Dequeue
    REMOVEHelloo 18
    2001/10/17 15:55:0:251 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 19
    2001/10/17 15:55:0:321 INFO [main] DS::run: Dequeue REMOVEHelloo
    19
    2001/10/17 15:55:0:602 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 20
    2001/10/17 15:55:0:622 INFO [main] DS::run: Dequeue REMOVEHelloo
    20
    2001/10/17 15:55:0:922 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 21
    2001/10/17 15:55:0:932 INFO [main] DS::run: Dequeue REMOVEHelloo
    21
    2001/10/17 15:55:1:263 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 22
    2001/10/17 15:55:1:283 INFO [main] DS::run: Dequeue REMOVEHelloo
    22
    2001/10/17 15:55:1:623 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 23
    2001/10/17 15:55:1:633 INFO [main] DS::run: Dequeue REMOVEHelloo
    23
    2001/10/17 15:55:1:933 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 24
    2001/10/17 15:55:1:953 INFO [main] DS::run: Dequeue REMOVEHelloo
    24
    2001/10/17 15:55:2:484 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 25
    2001/10/17 15:55:2:504 INFO [main] DS::run: Dequeue REMOVEHelloo
    25
    2001/10/17 15:55:2:775 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 26
    2001/10/17 15:55:2:855 INFO [main] DS::run: Dequeue REMOVEHelloo
    26
    2001/10/17 15:55:3:135 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 27
    2001/10/17 15:55:3:155 INFO [main] DS::run: Dequeue REMOVEHelloo
    27
    2001/10/17 15:55:3:436 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 28
    2001/10/17 15:55:3:456 INFO [main] DS::run: Dequeue REMOVEHelloo
    28
    2001/10/17 15:55:3:736 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 29
    2001/10/17 15:55:3:756 INFO [main] DS::run: Dequeue REMOVEHelloo
    29
    2001/10/17 15:55:4:86 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 30
    2001/10/17 15:55:4:106 INFO [main] DS::run: Dequeue REMOVEHelloo
    30
    2001/10/17 15:55:4:407 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 31
    2001/10/17 15:55:4:427 INFO [main] DS::run: Dequeue REMOVEHelloo
    31
    2001/10/17 15:55:4:707 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 32
    2001/10/17 15:55:4:727 INFO [main] DS::run: Dequeue REMOVEHelloo
    32
    2001/10/17 15:55:5:68 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 33
    2001/10/17 15:55:5:88 INFO [main] DS::run: Dequeue REMOVEHelloo
    33
    2001/10/17 15:55:5:468 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 34
    2001/10/17 15:55:5:488 INFO [main] DS::run: Dequeue REMOVEHelloo
    34
    2001/10/17 15:55:5:769 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 35
    2001/10/17 15:55:5:789 INFO [main] DS::run: Dequeue REMOVEHelloo
    35
    2001/10/17 15:55:6:69 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 36
    2001/10/17 15:55:6:149 INFO [main] DS::run: Dequeue REMOVEHelloo
    36
    2001/10/17 15:55:6:430 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 37
    2001/10/17 15:55:6:450 INFO [main] DS::run: Dequeue REMOVEHelloo
    37
    2001/10/17 15:55:6:730 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 38
    2001/10/17 15:55:6:750 INFO [main] DS::run: Dequeue REMOVEHelloo
    38
    2001/10/17 15:55:7:31 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 39
    2001/10/17 15:55:7:51 INFO [main] DS::run: Dequeue REMOVEHelloo
    39
    2001/10/17 15:55:7:381 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 40
    2001/10/17 15:55:7:401 INFO [main] DS::run: Dequeue REMOVEHelloo
    40
    2001/10/17 15:55:7:692 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 41
    2001/10/17 15:55:7:702 INFO [main] DS::run: Dequeue REMOVEHelloo
    41
    2001/10/17 15:55:7:992 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 42
    2001/10/17 15:55:8:12 INFO [main] DS::run: Dequeue REMOVEHelloo
    42
    2001/10/17 15:55:8:372 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 43
    2001/10/17 15:55:8:392 INFO [main] DS::run: Dequeue REMOVEHelloo
    43
    2001/10/17 15:55:8:683 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 44
    2001/10/17 15:55:8:703 INFO [main] DS::run: Dequeue REMOVEHelloo
    44
    2001/10/17 15:55:8:983 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 45
    2001/10/17 15:55:9:3 INFO [main] DS::run: Dequeue REMOVEHelloo
    45
    2001/10/17 15:55:9:314 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 46
    2001/10/17 15:55:9:394 INFO [main] DS::run: Dequeue REMOVEHelloo
    46
    2001/10/17 15:55:9:704 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 47
    2001/10/17 15:55:9:724 INFO [main] DS::run: Dequeue REMOVEHelloo
    47
    2001/10/17 15:55:10:15 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 48
    2001/10/17 15:55:10:35 INFO [main] DS::run: Dequeue REMOVEHelloo
    48
    2001/10/17 15:55:10:335 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 49
    2001/10/17 15:55:10:355 INFO [main] DS::run: Dequeue
    REMOVEHelloo 49
    2001/10/17 15:55:10:696 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 50
    2001/10/17 15:55:10:716 INFO [main] DS::run: Dequeue
    REMOVEHelloo 50
    2001/10/17 15:55:10:996 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 51
    2001/10/17 15:55:11:16 INFO [main] DS::run: Dequeue REMOVEHelloo
    51
    2001/10/17 15:55:11:337 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 52
    2001/10/17 15:55:11:357 INFO [main] DS::run: Dequeue
    REMOVEHelloo 52
    2001/10/17 15:55:11:687 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 53
    2001/10/17 15:55:11:707 INFO [main] DS::run: Dequeue
    REMOVEHelloo 53
    2001/10/17 15:55:11:998 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 54
    2001/10/17 15:55:12:18 INFO [main] DS::run: Dequeue REMOVEHelloo
    54
    2001/10/17 15:55:12:338 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 55
    2001/10/17 15:55:12:348 INFO [main] DS::run: Dequeue
    REMOVEHelloo 55
    2001/10/17 15:55:12:709 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 56
    2001/10/17 15:55:12:729 INFO [main] DS::run: Dequeue
    REMOVEHelloo 56
    2001/10/17 15:55:12:989 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 58
    2001/10/17 15:55:13:9 INFO [main] DS::run: Dequeue REMOVEHelloo
    58
    2001/10/17 15:55:13:319 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 57
    2001/10/17 15:55:13:339 INFO [main] DS::run: Dequeue
    REMOVEHelloo 57
    2001/10/17 15:55:13:670 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 59
    2001/10/17 15:55:13:690 INFO [main] DS::run: Dequeue
    REMOVEHelloo 59
    2001/10/17 15:55:13:970 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 60
    2001/10/17 15:55:13:990 INFO [main] DS::run: Dequeue
    REMOVEHelloo 60
    2001/10/17 15:55:14:291 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 61
    2001/10/17 15:55:14:311 INFO [main] DS::run: Dequeue
    REMOVEHelloo 61
    2001/10/17 15:55:14:591 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 62
    2001/10/17 15:55:14:671 INFO [main] DS::run: Dequeue
    REMOVEHelloo 62
    2001/10/17 15:55:15:603 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 63
    2001/10/17 15:55:15:623 INFO [main] DS::run: Dequeue
    REMOVEHelloo 63
    2001/10/17 15:55:15:933 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 64
    2001/10/17 15:55:15:953 INFO [main] DS::run: Dequeue
    REMOVEHelloo 64
    2001/10/17 15:55:16:274 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 65
    2001/10/17 15:55:16:294 INFO [main] DS::run: Dequeue
    REMOVEHelloo 65
    2001/10/17 15:55:16:624 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 66
    2001/10/17 15:55:16:644 INFO [main] DS::run: Dequeue
    REMOVEHelloo 66
    2001/10/17 15:55:16:934 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 67
    2001/10/17 15:55:16:944 INFO [main] DS::run: Dequeue
    REMOVEHelloo 67
    2001/10/17 15:55:17:325 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 68
    2001/10/17 15:55:17:345 INFO [main] DS::run: Dequeue
    REMOVEHelloo 68
    2001/10/17 15:55:17:665 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 69
    2001/10/17 15:55:17:685 INFO [main] DS::run: Dequeue
    REMOVEHelloo 69
    2001/10/17 15:55:17:956 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 70
    2001/10/17 15:55:17:976 INFO [main] DS::run: Dequeue
    REMOVEHelloo 70
    2001/10/17 15:55:18:326 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 71
    2001/10/17 15:55:18:346 INFO [main] DS::run: Dequeue
    REMOVEHelloo 71
    2001/10/17 15:55:18:617 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 72
    2001/10/17 15:55:18:687 INFO [main] DS::run: Dequeue
    REMOVEHelloo 72
    2001/10/17 15:55:19:17 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 73
    2001/10/17 15:55:19:37 INFO [main] DS::run: Dequeue REMOVEHelloo
    73
    2001/10/17 15:55:19:338 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 74
    2001/10/17 15:55:19:358 INFO [main] DS::run: Dequeue
    REMOVEHelloo 74
    2001/10/17 15:55:19:668 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 75
    2001/10/17 15:55:19:688 INFO [main] DS::run: Dequeue
    REMOVEHelloo 75
    2001/10/17 15:55:20:19 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 76
    2001/10/17 15:55:20:39 INFO [main] DS::run: Dequeue REMOVEHelloo
    76
    2001/10/17 15:55:20:359 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 77
    2001/10/17 15:55:20:379 INFO [main] DS::run: Dequeue
    REMOVEHelloo 77
    2001/10/17 15:55:20:660 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 78
    2001/10/17 15:55:20:680 INFO [main] DS::run: Dequeue
    REMOVEHelloo 78
    2001/10/17 15:55:21:20 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 79
    2001/10/17 15:55:21:40 INFO [main] DS::run: Dequeue REMOVEHelloo
    79
    2001/10/17 15:55:21:361 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 80
    2001/10/17 15:55:21:381 INFO [main] DS::run: Dequeue
    REMOVEHelloo 80
    2001/10/17 15:55:21:661 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 81
    2001/10/17 15:55:21:681 INFO [main] DS::run: Dequeue
    REMOVEHelloo 81
    2001/10/17 15:55:22:72 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 82
    2001/10/17 15:55:22:82 INFO [main] DS::run: Dequeue REMOVEHelloo
    82
    2001/10/17 15:55:22:382 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 83
    2001/10/17 15:55:22:402 INFO [main] DS::run: Dequeue
    REMOVEHelloo 83
    2001/10/17 15:55:22:692 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 84
    2001/10/17 15:55:22:713 INFO [main] DS::run: Dequeue
    REMOVEHelloo 84
    2001/10/17 15:55:23:53 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 85
    2001/10/17 15:55:23:63 INFO [main] DS::run: Dequeue REMOVEHelloo
    85
    2001/10/17 15:55:23:403 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 86
    2001/10/17 15:55:23:413 INFO [main] DS::run: Dequeue
    REMOVEHelloo 86
    2001/10/17 15:55:23:694 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 87
    2001/10/17 15:55:23:714 INFO [main] DS::run: Dequeue
    REMOVEHelloo 87
    2001/10/17 15:55:24:886 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 88
    2001/10/17 15:55:24:966 INFO [main] DS::run: Dequeue
    REMOVEHelloo 88
    2001/10/17 15:55:25:286 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 89
    2001/10/17 15:55:25:296 INFO [main] DS::run: Dequeue
    REMOVEHelloo 89
    2001/10/17 15:55:25:637 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 90
    2001/10/17 15:55:25:657 INFO [main] DS::run: Dequeue
    REMOVEHelloo 90
    2001/10/17 15:55:25:937 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 91
    2001/10/17 15:55:25:957 INFO [main] DS::run: Dequeue
    REMOVEHelloo 91
    2001/10/17 15:55:26:338 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 92
    2001/10/17 15:55:26:358 INFO [main] DS::run: Dequeue
    REMOVEHelloo 92
    2001/10/17 15:55:26:628 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 93
    2001/10/17 15:55:26:648 INFO [main] DS::run: Dequeue
    REMOVEHelloo 93
    2001/10/17 15:55:26:928 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 94
    2001/10/17 15:55:26:948 INFO [main] DS::run: Dequeue
    REMOVEHelloo 94
    2001/10/17 15:55:27:319 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 95
    2001/10/17 15:55:27:339 INFO [main] DS::run: Dequeue
    REMOVEHelloo 95
    2001/10/17 15:55:27:609 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 96
    2001/10/17 15:55:27:629 INFO [main] DS::run: Dequeue
    REMOVEHelloo 96
    2001/10/17 15:55:27:910 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 97
    2001/10/17 15:55:27:930 INFO [main] DS::run: Dequeue
    REMOVEHelloo 97
    2001/10/17 15:55:28:280 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 98
    2001/10/17 15:55:28:360 INFO [main] DS::run: Dequeue
    REMOVEHelloo 98
    2001/10/17 15:55:28:631 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 99
    2001/10/17 15:55:28:651 INFO [main] DS::run: Dequeue
    REMOVEHelloo 99
    2001/10/17 15:55:28:941 INFO [main] DS::run: Dequeue BROWSE -
    Helloo 100
    2001/10/17 15:55:28:951 INFO [main] DS::run: Dequeue
    REMOVEHelloo 100

    As other members adviced
    Please check the following as a list
    1) Check first fi the Material is in APO relevant
    2) Check if it has active integration model in cfm5 (R/3)
    3) Check if the material has no blocked queues in /n/sapapo/cq (APO)
    If there are any blocked queues please clear them accordingly.
    4) After that perform a reconciliation of the transactional data through.
    /n/sapapo/ccr(APO). perform it only for that material and on planned orders.
    If there are any errors it will usggest you to follow few steps.
    5) then again go back and check the /n/sapapo/cq transaction.
    6) Check if the material and its location has publication Types maintained in SPRO transaction.
    7) Check if the change pointers of this Planned order exists in /n/sapapo/c5
    This si change pointers transaction , soemtimes you can release ti from there also.
    If you still have problem, give the resutls of the following for reference.
    Let us know once you perform all these.
    8) Incase you need to perform the consistency checks  externally.

  • How to dequeue Oracle queue(enqueue in Ora) in java using JMS text message

    I'm trying below java code but its giving me error:
    public class testq {
    public static void main(String[] args) throws Exception {
    testq q = new testq();
    AQSession aq_sess = createSession();
    q.runTest(aq_sess);
    public static AQSession createSession() {
    Connection db_conn;
    AQSession aq_sess = null;
    try {
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    /* Load the Oracle8i AQ driver: */
    Class.forName("oracle.AQ.AQOracleDriver");
    db_conn = DriverManager.getConnection("jdbc:oracle:thin:@10.10.10.10:1521:demo", "demo_app", "demo");
    System.out.println("JDBC Connection opened ");
    db_conn.setAutoCommit(false);
    /* Creating an AQ Session: */
    aq_sess = AQDriverManager.createAQSession(db_conn);
    System.out.println("Successfully created AQSession ");
    catch (Exception ex) {
    System.out.println("Exception: " + ex);
    ex.printStackTrace();
    return aq_sess;
    public void runTest(AQSession aq_sess) {
    //AQQueueTable q_table;
    AQQueue queue;
    AQMessage message;
    AQRawPayload raw_payload;
    AQDequeueOption deq_option;
    byte[] b_array;
    Connection db_conn;
    try {
    db_conn = ((AQOracleSession)aq_sess).getDBConnection();
    /* Get a handle to a queue - aq_queue4 in aquser schema: */
    queue = aq_sess.getQueue ("myadmin", "STREAM_QUEUE_DEMO");
    System.out.println("Successful getQueue");
    /* Creating a AQDequeueOption object with default options: */
    deq_option = new AQDequeueOption();
    deq_option.setDequeueMode(AQDequeueOption.DEQUEUE_REMOVE);
    /* Set wait time to 10 seconds: */
    deq_option.setWaitTime(10);
    /* Dequeue a message: */
    message = queue.dequeue(deq_option);
    System.out.println("Successful dequeue");
    /* Retrieve raw data from the message: */
    raw_payload = message.getRawPayload();
    b_array = raw_payload.getBytes();
    db_conn.commit();
    String value = new String(b_array);
    System.out.println("queue="+value);
    } catch(Exception e) {
    e.printStackTrace();
    The error says "oracle.AQ.AQException: JMS-174: Class must be specified for queues with object payloads
    Use dequeue(deq_option, payload_fact) or dequeue(deq_option, sql_data_cl)"
    Can any one tell me how to fix this error & how to get bulk dequeue messages?
    And i am using sys.AQ$_JMS_TEXT_MESSAGE payload type during enqueue.
    Can any one tell me how to fix this Java program to dequeue it?
    Thanks in advance...Please its urgent
    Thanks!

    the code is as bellow
    File fBlob = new File ("test.pdf");
    FileInputStream fIS = new FileInputStream(fBlob);
    pstUpdate= con.prepareStatement("UPDATE table set file = ? where id = ?");
    pstUpdate.setBinaryStream(1, fIS, (int) fBlob.length());
    pstUpdate.setString(2, rs.getString("id"));
    pstUpdate.execute();
    con.commit();

  • Dequeue message enqueued by different Oracle user

    I have two applications say A and B both are connected to same DB using differenct users i.e. UserA and UserB. The A application is enqueuing messages in AQ such as AQ_QTAB.ENQ_UI = 'UserA'.
    My spring based application(using spring AQ api) is connected with DB using UserB and listening on same AQ but I am not able see/dequeue message placed by UserA. However, if enqueue any message using UserB, it is properly dequeued by my listener.
    Can any one please help me out? What sort of preliviges / propertiese I need to set.
    Thanks

    user8391890 wrote:
    My spring based application(using spring AQ api) is connected with DB using UserB and listening on same AQ but I am not able see/dequeue message placed by UserA. However, if enqueue any message using UserB, it is properly dequeued by my listener.
    Do you get an error or is it simply not getting a message? If you have insufficient privileges I'd expect an error e.g. ORA-01031:Insufficient Privileges
    Here is the procedure for granting enqueue/dequeue privileges to other users of a queue:
    http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_aqadm.htm#i1014966
    HTH
    Paul

  • Dequeuing messages not working

    I am trying to dequeue messages through the use of a java durable subscriber. That is the only subscriber. I successfully get the message and then call the method _session.commit();. Neither throw any errors and I am confused as to why the queue shows the message as processed yet it is still in the queue. Is there an orcale process that needs to be running to remove these dequeued messages? Propagation between databases is not a valid solution. So, some of the examples do not hold for my current setup.
    my setup:
    oracle 9i
    create table, schema, objects, trigger to push jms messages into queue
    java client to dequeue messages.
    One strange thing I notice, at least to me, is that in order for the trigger to place messages into the queue, i need to either start the java durable subscriber up so it creates a subscriber or run the following: EXECUTE create_subs ( "name", "queue_name", null, null );. Now do I now have two subscribers once I start the java client up after running the PL/SQL command?
    per my requirements I need to be able to queue things through a trigger, thus I need to be able to queue messages without having a java durable subscriber running.
    Is there a way to determine who is subscribed? For some reason I am not seeing the information i need in any document or on any list.
    Any help would be greatly appreciated.
    Thanks,
    James

    createDurableSubscriber creates a new subscriber or gets an handle to an existing subscriber.
    When you enqueue a message - you must either have created the subscriber or explicitly specified the recipient during the publish. From what you are seeing it seems that you are trying to enqueue a message without creating the subscriber.
    If you want to do this then you must explicilty specify the recipient in the publish call. You'll need to use OJMS extensions in AQjmsSession to do this. The recipients can be specified as an array of AQjmsAgent s

  • Exception while dequeuing message

    Hi,
    I am getting an error sayin
    "Exception while dequeuing message : Dequeue error in AQ object, ORA-25215: user_
    data type and queue type do not match"
    What will be the problem?Please help me with solution.
    Thanks in advance

    This is the link i am following for enqueuing the message into a queue table, its happening successfully.
    http://www.oratechinfo.co.uk/aq.html
    I can see the message i enqueued in the queue table with the following query at the scheduled time.
    select user_data from queue_table;
    Below is the C++ code to dequeue the msg.In DequeueObject() function on this particular line "msgid = oaq.Dequeue();"
    the control moves to console which not proceeding further.I am wondering what went wrong.
    //This is a simple program showing how to call oo4o api from a mulithreaded application.
    //Note that every thread has its own OStartup() and OShutdown() routines.
    // PROJECT SETTINGS : Under C/C++ option, make sure the project options is /MT for release
    // or /MTd for debug(NOT /ML or /MLd).
    #include "windows.h"
    #include "stdio.h"
    #include <iostream>
    #include <process.h>          
    #include <oracl.h>
    using namespace std;
    OSession osess ;
    int DequeueRaw();
    int DequeueObject();
    int main(int argc, char **argv)
         int retVal = 0;
         OStartup(OSTARTUP_MULTITHREADED);
         // create session object for each thread. This gives maximum
         // concurrency to the thread execution. This is also useful when OO4O
         // error reported on session object for one thread cannot be seen by
         // another thread.
         try
              osess.Open();
              if ( ! osess.IsOpen() )
                   cout << "Session not opened: Error: " << osess.GetErrorText() << endl;
                   osess.Close();
                   OShutdown();
                   return -1;
         //     retVal = DequeueRaw();
              retVal = DequeueObject();
         catch(OException oerr)
              cout << "Exception while dequeuing message : " << oerr.GetErrorText() << endl;
              retVal = -1;
         return retVal;
    // This function dequeues a message of default type(string of characters)
    // from the raw_msg_queue.
    // Gets the message priority after dequeuing
    // Checks if any message with correlation like 'AQ' is available on the queue.
    int DequeueRaw()
         ODatabase odb;
         OAQ oaq;
         OAQMsg oaqmsg;
         OValue msg;
         const char *msgid = 0;
         odb.Open(osess, "MICROSOFT", "OMNIPOS", "OMNIPOS");
         if ( ! odb.IsOpen() )
              cout << "Database not opened: " << odb.GetErrorText() << endl;
              odb.Close();
              return(-1);
         // Open the 'raw_msg_queue'
         oaq.Open(odb,"example_queue");
         if( !oaq.IsOpen())
              cout << "AQ not opened: " << oaq.GetErrorText() << endl;
              return(-1);
         // Get an instance of the default message(of RAW type)
         oaqmsg.Open(oaq);
         if( !oaqmsg.IsOpen() )
              cout << "AQMsg not opened: " << oaqmsg.GetErrorText() << endl;
              return(-1);
         // Dequeue a message
         //msgid = oaq.Dequeue();
         //if (msgid )
         //     // Retrieve the message attributes
         //     oaqmsg.GetValue(&msg);
         //     const char *msgval = msg;
         //     cout << "Message '" << msgval <<
         //          "' dequeued at priority : " << oaqmsg.GetPriority() << endl;
         // Dequeue message with correlation like "AQ"
         oaq.SetCorrelate("%AQ%");
         oaq.SetDequeueMode(3);
         msgid = oaq.Dequeue();
         if (msgid )
              // Retrieve the message attributes
              char msgval[101];
              long len = oaqmsg.GetValue(msgval,100);
              msgval[len] = '\0';
              cout << "Message '" << msgval <<
                   "' dequeued at priority : " << oaqmsg.GetPriority() << endl;
         // Close all of the objects
         oaqmsg.Close();
         oaq.Close();
         odb.Close();
         return 0;
    // This function dequeues a message of user-defined type MESSAGE_TYPE
    // from the msg_queue.
    // Gets the message priority after dequeuing
    // Checks if any message with correlation like 'SCOTT' is available on the queue.
    int DequeueObject()
         ODatabase odb;
         OAQ oaq;
         OAQMsg oaqmsg;
         const char *msgid = 0;
         OValue msg;
         char subject[255];
         char text[255];
         odb.Open(osess, "MICROSOFT", "OMNIPOS", "OMNIPOS");
         if ( ! odb.IsOpen() )
              cout << "Database not opened: " << odb.GetErrorText() << endl;
              odb.Close();
              return(-1);
         // Open the 'msg_queue'
         oaq.Open(odb,"example_queue");
         if( !oaq.IsOpen())
              cout << "AQ not opened: " << oaq.GetErrorText() << endl;
              return(-1);
         // Get an instance of the udt MESSAGE_TYPE (check out schema for details)
         oaqmsg.Open(oaq,1,"MESSAGE_TYPE");
         if( !oaqmsg.IsOpen() )
              cout << "AQMsg not opened: " << oaqmsg.GetErrorText() << endl;
              return(-1);
         // Dequeue message with correlation like "SCOTT"
         oaq.SetCorrelate("%OMNIPOS%");
         oaq.SetDequeueMode(3);
         msgid = oaq.Dequeue();
         if (msgid )
              // Retrieve the message attributes
              // Get the subject,text attributes of the message
              OObject msgval;
              oaqmsg.GetValue(&msgval);
              msgval.GetAttrValue("subject", subject,255);     
              msgval.GetAttrValue("text", text,255);
              cout << "Message '" << (subject ? subject :"") << "' & Body : '" << text <<
                   "' dequeued at priority : " << oaqmsg.GetPriority() << endl;
              msgval.Close();
         msgid = 0;
         oaq.SetNavigation(1);
         oaq.SetCorrelate("");
         // Dequeue a message
         msgid = oaq.Dequeue();
         if (msgid )
              // Retrieve the message attributes
              OObject msgval;
              oaqmsg.GetValue(&msg);
              msgval = msg;          
              // Get the subject,text attributes of the message
              msgval.GetAttrValue("subject", subject,255);     
              msgval.GetAttrValue("text", text,255);
              cout << "Message '" << (subject ? subject :"") << "' & Body : '" << text <<
                   "' dequeued at priority : " << oaqmsg.GetPriority() << endl;
              msgval.Close();
         // Close all of the objects
         msgid = NULL;
         msg.Clear();
         oaqmsg.Close();
         oaq.Close();
         odb.Close();
         return 0;
    }

  • Dequeue Messages queued by caprture process

    RDBMS Version: 10.1.0.4
    Operating System and Version: WINDOWS 2003 SERVER
    Error Number (if applicable):
    Product (i.e. SQL*Loader, Import, etc.): Oracle Streams
    Hi,
    Can I do the following.
    I had set up couple of databases for replication using ORACLE STREAMS in hub configuration(One central and many local). My problem is that sometimes some of the connection between them will not work for a significant period of time. That's why I need some tool to move the data.
    So I decide to dequeue the which are captured by the CAPTURE process and to process them with a PL/SQL program, save their payload in a file or external table and then trough some way to bring this data to the master server and the other way round.
    But I can't dequeue messages because the agent created for the propagation process has no name and I can't dequeue messages if I don't have the CONSUMER.
    All examples that I saw in Metalink use already propagated messages with a propagation process.
    So I need some other way to propagate my messages different then propagation process! The task is even more complicated because at the central DB some of the messages has a multiple consumers...
    Any suggestions?

    Wel in 10g it is just as simple as: create a apply-process by adding a table/schema rule that matches the enqueued messages. If you have a captureprocess for several tables off a schema, then a schema rule for that schema owning those tables would do. Then with the set_enqueue_destination api you can add a queue on this rule. Which means that the apply process won't apply those messages but reroutes them on your user-queue. This queue you can create by yourself but it must be of type 'sys.anydata'.
    The messages enqueued on that queue by the apply process can be dequeued by a user process.
    So just put-in an apply process that dequeues the captured LCR's for you and enqueues them on your user-queue. And then you can dequeue them.
    Regards,
    Martien

  • AQ message notification dispatch order

    Hi,
    My apologies if the answers to these questions are in the docs, but I cannot find them!
    I need to understand the order in which asynchronous notifications will arrive at a client, as it will be a large overhead to check whether a new message has been superceded by a by an earlier arrival (determined using message enqueue times).
    Two issues:
    1. Is there a strict order in which notifications for a specific client are dispatched? I.e. can we guarantee that the order in which notifications are made matches the order messages where enqueued?
    2. How does the client receive these notifications? Are there multiple threads listening for the notifications, or just a single thread?
    Pointers to relevant doc would be welcomed!
    Thanks,
    Richard.

    Actually, I think I can answer much of my own question...
    It doesn't matter when notifications are posted! As long as we explicitly DQ the messages, because we choose to DQ the oldest unread message. This message is marked as read and the next DQ picks up the next message in the sequence (note: assumption here is queue table orders on enqueue time).
    The only problem then is if the client has multiple (notification) threads which can asynchonously receive notifications (and aysnchronously DQ the notifications - which may result in out of sequeunce messages if there is a network delay?). We can, of course, do something about that ourselves by synchronizing the callback functions.

  • Does listen get unblocked if there is uncommitted dequeued message

    Here is the scenario.
    I have 2 threads.
    1 comes in; Does listen on a multi consumer queue. Gets a message and starts
    processing.
    At this point 2 comes in; Does the listen; At this point there are no new messages
    on the queue. But thread 1 has not committed the dequeue. Will the listen wait
    for the duration specified ? or will it return right away?
    If it did return right away, then I cannot really do a listen until the thread 1 has committed.
    What is expected behavior?
    Thanks
    Vijay

    The answer to your question is I don't know because I would never enqueue or dequeue messages with default parameters. Not only is it a bad practice in that behavior can potentially change after upgrading or applying patches but doing so makes maintenance infinitely more difficult, as you are now discovering, because no one necessarily remembers for each version what the default behavior is.
    When you want a specific behavior you code that specific behavior.
    Read the docs on the following:
    dbms_aq.dequeue_options_t
    dbms_aq.enqueue_options_t
    dbms_aq.message_properties_t
    Then define the properties you want.
    You can find some information about them here:
    http://www.psoug.org/reference/dbms_aq.html
    The docs are at http://tahiti.oracle.com. Search for them by name.

  • Code sample to dequeue messages

    I am looking for a code sample to dequeue messages from CRM OD? How do I retrieve the xml file after it is generated. Do I need to use a web service to retrieve that?
    Preference would be to get the code snippet in java, but not necessary.
    Thanks.

    Hi,
    I'm assuming you are referring to integration event messages? If so, then yes, you do need to use WS in order to retrieve them from CRMOD. Please refer to the CRM On Demand online help for Integration Events. It will provide details on downloading the WSDL file for Integration Events and the schema files which are required to process the events once they are retrieved. The WS User Guide contains details regarding the use of the GetEvents and DeleteEvents methods to retrieve and delete events from the queue.
    Sorry, I don't currently have a code sample that I can provide.
    Thanks,
    Sean

  • "Error while reading Exceptions" - Message No. /SCMB/ORDER 351

    Hello,
    An error message that we are getting as "Error while reading Exceptions" - Message No. /SCMB/ORDER 351 while entering a Work Order Number in the 'Work Order details' screen in the SNC Web UI. So, please let us know how to tackle this error in SNC.
    Regards,
    PCN

    Hello Pavan,
    This message can occure at multiple places. Most of these are status reading and checking in the /SCA/CL_SVORDER class. The following methods can throw this message:
    CHECK_ITEM_EXCEPTION_STATUS
    You can set a BP at line 20 and debug the STATUS_CHECK function.
    GET_ITEM_EXCEPTION_STATUS
    You can set a BP at line 29 and debug the STATUS_READ function.
    READ_ITEM_EXCEPTION_STATUS 
    You can set a BP at line 31 and debug the /scmb/cl_odm=>get3_by_id method.
    I hope this will help you.
    Regards,
    Richard

  • Error Message while doing Order CLSD

    Hi,
    I am getting error message while doing Order CLSD...
    Error Msg: Invalid cost element(XXXX) for reservation item 010.
    please suggest me...how to solve this issue.
    regards,
    Venkatesan Anandan

    Hi Venkatesan,
    I had replied and asked for one clarrification and to check same at your end.
    Is your Cost Element mapping done with cost cost center used in order settlement rule.
    Also check for Material Master Change document for Valuation Class change and revert back in this thread.

  • How to Configure a Pop Up Message in Sales Orders

    Hi,
    How can I display a message when creating or changing sales orders? I need the configuration steps for 4.6.
    Thanks,
    Sai.

    Hi,
    First you need to make an entry of your pop up message in the sales text view of the material master and when the user enters that material, he will be able to see that message. The Config part is in spro/sd/basic func/text control. You need to define the text types, access sequences and the text determ procedures.
    You have to maintain the desired text in the material master sales text editor and turn on the indicator 'Display texts during transfer' under Text control in configuration for the sales order-item for the material sales text. This will display a Pop-up message when booking orders
    Reward points if found helpfull...
    Cheers,
    Siva.

  • Customer error message in sales order on save

    Hi Friends,
    as per requirement i have to raise the error message and system should enable the field to change values. This should happen when condition is not met on Saving of Sales order.
    For this, i have used the user exit USEREXIT_SAVE_DOCUMENT_PREPARE. But the problem is system throwing error message and all r in display mode only. as per my requirement system should allow to change the error value field.
    i have verified many posting in this SDN, but nothing is working out.
    Please guide me, how to raise the error message and system should enable that filed.
    My doubt is where should i raise the error message in sales order (MV45AFZZ)??? if any badi to raise the error message also fine for me. I tried many ways like... message with display like..... and set / get parameters and badis....  but not able to find the correct solution.
    Thanks in Advance.
    Bala

    Hi
    You need to use check for enahcement spot, which will be help to you.
    Bcz you are throwing custom error message in the standard transaction, once the error is display, you could not able to change the values. your prob can be solved by using the enhancement sport.
    This is include name (Include:MV45AF0B_BELEG_SICHERN).
    In the above include, you need to create a enhancement spot after this spot (ENHANCEMENT 16  OI0_COMMON_SAPMV45A.)  
    write your custom code and while displaying an error message. set flag = 'x', then use below code. It will display error message once you press ENTER, you will get the sale order in change mode, you change the values.
      IF flag = 'X'.
              fcode = fcode_gleiche_seite.
              perform fcode_bearbeiten.
              ch_subrc = 4.
              exit.
            ENDIF.

Maybe you are looking for

  • How to track the cursor in the MODULE POOL?

    Hello everyone, I have developed one module pool program. I am facing a problem in tracking the cursor position. Let me tell you in detail. I have display/change button on the screen. If I come in change mode and gives a invalid value to any of the f

  • Trial Version Will Not Run on my Mac

    I have been trying to use the trial of Lightroom 5 to see if I will convert from iPhoto/Aperture to Photoshop/Lightroom.  I belong to a digital photography club and we are evaluating "endorsing" a single platform so we can provide education and train

  • Unable to find entry in ALL_SDO_GEOM_METADATA in predefined  theme

    Hello I've a strange problem with mapviewer. I've diferents themes, all with its definition in USER_SDO_THEMES. I've created the metadata information for the georaster table in USER_SDO_GEOM_METADATA and I've created the spatial index on the spatial

  • Rotate Plot Legend of XY graph

    Is it possible to rotate the plot legend so the letters of the plot names run from bottom to the top rather than across the operator interface? The names for my plots are bigger and I need to show at least four plots at the same time. Putting scales

  • Lightroom 3.6 will not edit to PS5

    When I try to edit a pic in CS5 from Lightroom 3.6, the shortcut keys and the menu selection will not work. There have been no changes to this machine, both Lightroom & Photoshop are current. Even the menu selection to edit in CS5 is greyed out and u