Oracle Advanced Queuing - Propagation problem - 11g

Hi,
I have a problem when propagation messages between queues. When the message is propagated, it stays on the source queue with READY state.
I have created two queues on 11g with a propagation rule that any message from queue A are sent to queue B. My problem is that the message from the source queue stays in the source queue even after propagation, which isn't what I was expecting. The problem doesn't occur if the queues are on a different database. This problem only happens if the queues are on the same database.
the script I use is this:
For USERB (which has the destination queue)
create type EVENT_MESSAGE as object (
eventsource VARCHAR2(30),
eventname VARCHAR2(255),
eventid NUMBER(19,0),
message CLOB
DECLARE
an_agent sys.aq$_agent;
BEGIN
-- create the publish/subscribe queue table
dbms_aqadm.create_queue_table(
queue_table => 'DESTINATION_QUEUE_TABLE',
queue_payload_type=>'EVENT_MESSAGE',
sort_list => 'ENQ_TIME',
message_grouping => DBMS_AQADM.NONE,
multiple_consumers=>true
-- create the queue
dbms_aqadm.create_queue(
queue_name => 'DESTINATION',
queue_table => 'DESTINATION_QUEUE_TABLE',
queue_type => DBMS_AQADM.NORMAL_QUEUE,
max_retries => 5
dbms_aqadm.create_aq_agent(agent_name =>'DEQUEUE_AGENT');
an_agent := sys.aq$_agent('DEQUEUE_AGENT', null, null);
dbms_aqadm.enable_db_access(
agent_name => 'DEQUEUE_AGENT',
db_username => 'USERB'
dbms_aqadm.add_subscriber(
queue_name => 'DESTINATION',
subscriber => an_agent,
queue_to_queue => FALSE,
delivery_mode => DBMS_AQADM.PERSISTENT
-- start the queues
dbms_aqadm.start_queue('DESTINATION');
END;
For USERA
create type EVENT_MESSAGE as object (
eventsource VARCHAR2(30),
eventname VARCHAR2(255),
eventid NUMBER(19,0),
message CLOB
BEGIN
-- create the publish/subscribe queue table
dbms_aqadm.create_queue_table(
queue_table => 'SOURCE_QUEUE_TABLE',
queue_payload_type=>'EVENT_MESSAGE',
sort_list => 'ENQ_TIME',
message_grouping => DBMS_AQADM.NONE,
multiple_consumers=>true
-- create the queue
dbms_aqadm.create_queue(
queue_name => 'SOURCE',
queue_table => 'SOURCE_QUEUE_TABLE',
queue_type => DBMS_AQADM.NORMAL_QUEUE,
max_retries => 5
-- start the queues
dbms_aqadm.start_queue('SOURCE');
-- create the propagation
dbms_aqadm.add_subscriber(queue_name => 'SOURCE',
subscriber => sys.aq$_agent('DEQUEUE_AGENT','USERB.DESTINATION',null),
queue_to_queue => true);
dbms_aqadm.schedule_propagation(queue_name => 'SOURCE',
start_time => sysdate,
latency => 25,
destination_queue => 'USERB.DESTINATION');
END;
When I enqueue a message to the source on USERA with this:
declare
rc binary_integer;
nq_opt dbms_aq.enqueue_options_t;
nq_pro dbms_aq.message_properties_t;
datas EVENT_MESSAGE;
msgid raw(16);
begin
nq_pro.expiration := dbms_aq.never;
nq_pro.sender_id := sys.aq$_agent('ENQUEUE_AGENT', null, null);
datas := AGEAS_EVENT_MESSAGE('message','eventname',1,null);
dbms_aq.enqueue('SOURCE',nq_opt,nq_pro,datas,msgid);
end;
The message is propagated to the destination queue, no problem, but the message state on the source queue is kept as ready. I would have expected it to be marked as processed and disappear from the queue table.
When I look at the AQ$_SOURCE_QUEUE_TABLE_S the I see these records:
     QUEUE_NAME     NAME     ADDRESS     PROTOCOL      SUBSCRIBER TYPE
     SOURCE     (null)     "USERB"."DESTINATION"@AQ$_LOCAL     0     1736
     SOURCE     DEQUEUE_AGENT     "USERB"."DESTINATION"     0     577
Can anyone help?

I was talking about following oracle documentations:
Oracle Database 11g: Advanced Queuing (Technical Whitepaper)
Streams Advanced Queuing: Best Practices (Technical Whitepaper)
Oracle Streams Advanced Queuing and Real Application Clusters: Scalability and Performance Guidelines (Technical Whitepaper)
They are available at.. http://www.oracle.com/technetwork/database/features/data-integration/default-159085.html

Similar Messages

  • Propagation between queues in Oracle Advanced Queuing

    We would like to connect two queues that reside in different database schemas/instances.
    We try to use the propagation feature of Oracle to achieve this.
    The queue-type is the same for both queues.
    Enqueuing is done with a recipient list in order to set multiple local subscribers for the messages that are put onto the queue.
    We would like to propagate between queues without changing the applications that write to originating queue and the other applications that read from the target queue.
    During our research we only found ways where we need to change the application that writes onto the queue, which is not acceptable for us. Also the list of subscribers needs to be different based on the message.
    Therefore I have the following question:
    - is there a way to set up propagation between queues in a way where we don't need to modify the sending application?
    - if not, is there a different way to connect two queues via a subscriber/consumer?

    Oracle8i for Linux does have AQ, although I haven't evaluated it
    yet. If you're still having trouble with the install, make sure
    you get the patch. A quicker and easier way to get Oracle8i up
    cheaply for evaluation is to download the NT version. I'm
    evaluating Oracle8i for both Linux and NT and the NT version is
    more stable.
    I would really appreciate hearing about your experiences with AQ
    on Oracle8 (8.0.4.3). I have several projects that we have been
    considering using AQ with. Please send me an email and tell me
    what problems / work-arounds you found.
    Christian Schroeder (guest) wrote:
    : Hello,
    : I still haven't managed to install 8i completely
    : (files with zero-length, wrong permissions, wrong JVM, ...),
    : anyway... -))
    : We are using Oracle Advanced Queuing under 8.0.4.3 on AIX in
    : a project at my company and I wondered if AQ is in 8i for
    Linux?
    : I really would like to evaluate it at home, since the AIX
    : AQ version has some bugs and restrictions which I really need
    to
    : get around.
    : My idea is to get 8i for AIX, but I wouldn't buy it if the
    : queuing is still unstable.
    : The 8.0.4 documentation states that one will get AQ in the
    : Enterprise Edition with message-type 'RAW' and the Objects
    Option
    : will add full functionality if also purchased. I didn't find
    : any comments on AQ in the installation guide.
    : Regards,
    : Christian
    null

  • Oracle advanced queuing

    Hi,
    I am new to Oracle Advanced queuing. I have a question.
    After enqueue operation, the message can be retrieved by dequeue operation.
    But, why do we need SCHEDULE_PROPAGATION ?
    Do we use that when we are sending it to a totally differnt queue in someother remote database ?
    Thanks,
    Message was edited by:
    user448390

    Do we use that when we are sending it to a totally
    differnt queue in someother remote database ?yes, partly true...SCHEDULE_PROPAGATION is used when we schedule propagation of messages to a destination identified by a Database Link.
    DBMS_AQADM.SCHEDULE_PROPAGATION (
       queue_name          IN    VARCHAR2,
       destination         IN    VARCHAR2 DEFAULT NULL,
       start_time          IN    DATE     DEFAULT SYSDATE,
       duration            IN    NUMBER   DEFAULT NULL,
       next_time           IN    VARCHAR2 DEFAULT NULL,
       latency             IN    NUMBER   DEFAULT 60,
       destination_queue IN VARCHAR2 DEFAULT NULL);
    destination_queue -- Name of the target queue to which messages are to be propagated in the form of a dblink.
    Messages may also be propagated to other queues in the same database by specifying a NULL destination. If a message has multiple recipients at the same destination in either the same or different queues, the message is propagated to all of them at the same time.
    Hope this will help..
    Thanks

  • Integration Oracle Advance Queue with OSB

    We are doing integration for Oracle Advance Queue with OSB.
    I created an AQ adapter in Jdev and generate the WSDL and XSD.
    I imported both WSDL and XSD in OSB Project.
    When i am configuring the business service and selecting the WSDl i am not able to select Binding and ports, is it due to any issue in WSDL?
    Please help.
    Thanks,
    Mihir Panda

    Hi again,
    I made some adjustments to your wsdl. I added the binding part and its reference to the appropriate port.
    Now I reckon, you should be able to do your thing:
    <wsdl:definitions
    name="enq"
    targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/aq/Applicatio90/Project4/enq"
    xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/aq/Applicatio90/Project4/enq"
    xmlns:opaque="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
    xmlns:obj1="http://xmlns.oracle.com/xdb/APPS"
    xmlns:ph="http://xmlns.oracle.com/pcbpel/adapter/aq/headers/payloadheaders/"
    xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    >
    <plt:partnerLinkType name="Enqueue_plt" >
    <plt:role name="Enqueue_role" >
    <plt:portType name="tns:Enqueue_ptt" />
    </plt:role>
    </plt:partnerLinkType>
    <wsdl:types>
    <!-- Define AQ Headers = Payload Headers -->
    <schema attributeFormDefault="qualified" elementFormDefault="qualified"
    targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/aq/headers/payloadheaders/"
    xmlns="http://www.w3.org/2001/XMLSchema"
    xmlns:obj1="http://xmlns.oracle.com/xdb/APPS" >
    <import namespace="http://xmlns.oracle.com/xdb/APPS" schemaLocation="xsd/APPS_WF_EVENT_T.xsd"/>
    <complexType name="enqHeaderCType" >
    <sequence>
    <!-- payload header -->
    <element name="PayloadHeader" type="xs:string" />
    </sequence>
    </complexType>
    <element name="enqHeader" type="ph:enqHeaderCType" />
    </schema>
    <schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/opaque/"
    xmlns="http://www.w3.org/2001/XMLSchema" >
    <element name="opaqueElement" type="base64Binary" />
    </schema>
    </wsdl:types>
    <wsdl:message name="Enqueue_msg">
    <wsdl:part name="opaque" element="opaque:opaqueElement"/>
    </wsdl:message>
    <wsdl:message name="Header_msg">
    <wsdl:part name="Header" element="ph:enqHeader"/>
    </wsdl:message>
    <wsdl:portType name="Enqueue_ptt">
    <wsdl:operation name="Enqueue">
    <wsdl:input message="tns:Enqueue_msg"/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="Enqueue_Binding" type="tns:Enqueue_ptt">
         <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
              <wsdl:operation name="Enqueue">
                   <soap:operation soapAction="put_your_own_URI_here"/>
                   <wsdl:input>
                        <soap:body use="literal"/>
                   </wsdl:input>
              </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="EnqueueService">
         <wsdl:port name="Enqueue_ptt" binding="tns:Enqueue_Binding">
              <soap:address location="No Target Adress"/>
         </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    Good luck.
    Regards,
    Ronald

  • Sample Message Driven Bean using Oracle Advance Queuing

    Hi,
    Can someone please provide me with sample MDB using Oracle Advance Queuing to Enqueue & Dequeue messages?
    Thanks

    Write your email Id .....I have got a test case which basically enqueus and dequeues the messages using Oracle9i AQ..
    --Venky                                                                                                                                                                                                                                                                   

  • Documentation for Oracle Advance Queue

    Any pointer to Documentation for Oracle Advance Queue?
    Thanks In Advance
    priyadarshi.

    hello,
    here it is
    http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96587/qintro.htm
    http://www.oracle.com/technology/sample_code/tech/dataint/index.html
    both will be useful
    thanks and regards
    VD

  • JPA + Oracle Advanced Queues

    Hi,
    Has anyone managed to share a transaction between the toplink JPA implementation and the Oracle Advanced Queues interface (which uses jdbc; java.sql.connection) in a J2SE environment?
    Running both in a J2EE environment is working fine, as both of them are using the JTA provided by OC4J.
    I've been trying to use JOTM as a lightweight JTA provider, but without any success at this point. JPA is using the datasource created by jotm (that includes the jotm transactionmanager), but it seems like JTA transactions are being ignored by the EntityMaanger at this point...
    regards,
    Bert

    Hi! I'm not a dev, but I know for sure ODP.NET does not support AQ. You might wanna have a look at Oracle Object for OLE (OO4O). It supports AQ and can be used in both VB.NET and C# through COM Interop. Of course, the performances will not be as good as ODP.NET tho.
    Have a nice one.
    Mathieu Gauthier
    Development Team
    JCMB Technology Inc

  • Weblogic JMS bridge between Weblogic and oracle Advanced Queue

    Hi,
    We are facing some issues when we are trying to integrate with Oracle AQ JMS through Weblogic.
    We have configured a Foreign AQ server which points to the oracle Advanced Queue and we are trying to create a Weblogic JMS bridge between AQ and weblogic. The bridge works perfectly if create the connection factories and bridge destinations with NonTX mode. The issue is with XA mode. Also we have deployed the Resource adaper for XAResource to use XA transactions.
    No help is available for the exception on google too :)
    Following is the exception we are getting.
    <An error occurred in bridge "aqjmsbridge" during the transfer of messages (javax.resource.ResourceException: Failed to setup the Resource Adapter Connection for enlistment in the transaction, Pool = 'eis/jms/WLSConnectionFactoryJNDIXA', javax.transaction.SystemException: start() failed on resource 'eis/jms/WLSConnectionFactoryJNDIXA': XA_OK
    javax.transaction.xa.XAException: method start should not be called on weblogic.transaction.internal.IgnoreXAResource
    at weblogic.jms.foreign.IgnoreXAResourceImpl.start(ForeignAQIntegration.java:260)
    at weblogic.connector.security.layer.AdapterLayer.start(AdapterLayer.java:513)
    at weblogic.connector.transaction.outbound.XAWrapper.start(XAWrapper.java:466)
    at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1184)
    at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1117)
    at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:275)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:516)
    at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:443)
    at weblogic.connector.transaction.outbound.XATxConnectionHandler.enListResource(XATxConnectionHandler.java:118)
    at weblogic.connector.outbound.ConnectionWrapper.invoke(ConnectionWrapper.java:218)
    at $Proxy59.receive(Unknown Source)
    at weblogic.jms.bridge.internal.MessagingBridge.processMessages(MessagingBridge.java:1427)
    at weblogic.jms.bridge.internal.MessagingBridge.beginForwarding(MessagingBridge.java:1002)
    at weblogic.jms.bridge.internal.MessagingBridge.run(MessagingBridge.java:1079)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    .).>
    Will appriciate any help for the above.
    Thanks and Regards,
    Navin

    Maybe this if of any help:
    - Re: Help with creating AQ JMS
    or
    - Re: AQ Weblogic integration - JMS-107: Operation not allowed on Connection

  • Oracle Advanced Queues

    Hi,
    I would like to know, how can I create Oracle Advanced Queues using Oracle 10g Enterprise Manager console/s.
    Thanks.

    Hi! I'm not a dev, but I know for sure ODP.NET does not support AQ. You might wanna have a look at Oracle Object for OLE (OO4O). It supports AQ and can be used in both VB.NET and C# through COM Interop. Of course, the performances will not be as good as ODP.NET tho.
    Have a nice one.
    Mathieu Gauthier
    Development Team
    JCMB Technology Inc

  • Oracle advanced queue 11G 11.2.0.x

    Hi
    Do we need extra license for using advanced queuing on Oracle 11G EE
    http://en.wikipedia.org/wiki/Oracle_Advanced_Queuing
    Thanks

    There are various limitations in oracle express edition for licensing you can refer to below url
    http://docs.oracle.com/cd/E17781_01/license.112/e18068.pdf

  • Oracle Advance Queue

    I am using Jdev / oc4j as my server. I have a message driven bean created which is supposed to listen to an advance queue created in an oracle db. I am having a lot of trouble deploying the application. Is there an easier way out of editing the xml files and writing deployment descriptor? Please help.
    Regards,
    Yazad Khambata.

    Hi,
    Just wondering if you were able to figure this out. I am too looking the samething. Basically MDB to listen on AQ, Can someone provide a simple example.
    Thanks

  • Advance Queue Propagation

    Hardware: alpha-vms
    I have a source queue, destination queue on the same database and another destination queue in a remote database.
    payload objects:
    create type js_change_typ as object ( bm_change_id NUMBER(9),
    source_job_id NUMBER(9),
    job_type NUMBER(6),
    role_id VARCHAR2(15),
    sub_type VARCHAR2(5),
    submission_timestamp DATE) NOT FINAL
    create type redec_cmn_typ under js_change_typ (
    BM_UNIT VARCHAR2(10),
    DATETIME_RECEIVED DATE,
    TA_ID VARCHAR2(10),
    SOURCE VARCHAR2(3)) FINAL
    1) all three queues have the same data type (queuename.user_data js_change_typ).
    Data enqued is of type js_change_typ to the source queue.
    In this case i can deque in the destination queue both in the same database and remote database - NOT A PROBLEM.
    2) all three queues have the same data type (quename.user_data js_change_typ)
    Data enqued is of type redec_cmn_typ (inherits js_change_typ).
    In this case, i can deque in the destination queue of the same database. BUT it DOES NOT propogate to the destination queue in the TARGET database.
    Is there an issue with inheritance when propogating to a remote database? Also i want to go on adding nested tables to the payload. Is this supported?
    I have tried with Oracle 9.2 and 10g.
    Thanks

    After raising a service request with Oracle and searching though documents established that Oracle DOES NOT SUPPORT:
    INHERITANCE
    NESTED TABLES
    etc.
    when PROPAGATING to a REMOTE database.

  • Xml in oracle advance queue

    i had already created a queue which will hold raw type of data. anybody know how enqueue it to the queue.pls. help

    The "Handling Asynchronous XML Messages in Queues" section on page 159 of Building Oracle XML Applications covers how to do this in detail from PL/SQL, and the similary-titled section on page 256 shows in detail how to do this with Java.
    You can download the source code for the book's hundreds of examples from the O'Reilly web site. These examples are in Chapters 5 (PL/SQL) and 6 (Java) respectively.

  • Error connecting WLS 10.3.1 JMS & MDBs with Oracle Advanced Queuing

    I followed the guide at http://blogs.oracle.com/imc/2010/12/how_to_use_oracle_aq_with_message-driven_beans_in_weblogic.html. Since the AQ queues were already set up by SAs and had been working with stateless session beans, I assume they're OK for use with MDBs. Names had to be changed in the WLS foreign server definition, destinations & connection factories to match.
    My MDB is:
    package xxxx;
    import javax.ejb.MessageDriven;
    import javax.jms.JMSException;
    import javax.jms.Message;
    import javax.jms.MessageListener;
    import javax.jms.TextMessage;
    @MessageDriven(name = "TestQueueListenerEJB")
    public class TestQueueListener implements MessageListener
    public void onMessage(Message message)
    if ( message instanceof TextMessage )
    try
    System.out.println("AQMDBTest: text message " + ((TextMessage)message).getText() + " processed");
    catch (JMSException e)
    e.printStackTrace();
    else
    System.out.println("AQMDBTest: generic message " + message.toString() +
    " of type " + message.getClass().getName() + " processed");
    And the relevant portion of the weblogic-ejb-jar.xml is:
    <weblogic-enterprise-bean>
    <ejb-name>TestQueueListenerEJB</ejb-name>
    <message-driven-descriptor>
    <pool>
    <max-beans-in-free-pool>1</max-beans-in-free-pool>
    <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
    </pool>
    <destination-jndi-name>TestQueue</destination-jndi-name>
    <connection-factory-jndi-name>TestQueueConnectionFactory</connection-factory-jndi-name>
    </message-driven-descriptor>
    </weblogic-enterprise-bean>
    So when I deploy this to my test domain I get an error:
    <Feb 23, 2011 3:11:28 PM CST> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: TestQueueListenerEJB is unable to connect to the
    JMS destination: TestQueue. The Error was:
    Can not get destination information. The destination JNDI name is TestQueue, the provider URL is null>
    The test connection of the datasource is successful.
    What else could I have wrong? This is my first post to this topic. Please let me know what additional information I need to provide about this. Or if I've provided too much.
    Thanks very much,
    Jim Greetham

    OK. So I got my DBAs to create a new user with the necessary privs. Created a new queue, table, etc. I have been able to receive messages from it. So I have some looking to do in my production database queue definitions.
    Jim

  • Can changes from oracle 9i be propagated to 11G databases using GG solutio

    Hi expert,
    Production database is 9.2.0.8.
    Target database 11.2.0.2
    We want to replicate 5 tables from 9 version to 11, and the updates happening to the tables in 9i should be propegated on target which is 11.2.0.2 but NOT viceversa.
    Both the databases are in different hosts but same platform Linux 5. Can this be possible?
    thanks,
    pbhand.

    Yes. Examples for GoldenGate on Solaris/Oracle 9i and Linux/Oracle 11g
    Oracle GoldenGate Capture for OracleVersion 11.1.1.0.27 Build 001
    Solaris, sparc, 64bit (optimized), Oracle 9 on Mar 14 2011 13:02:29
    Copyright (C) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
    Oracle GoldenGate Capture for Oracle
    Version 11.1.1.0.0 Build 078
    Linux, x86, 32bit (optimized), Oracle 11 on Jul 28 2010 15:20:23
    Copyright (C) 1995, 2010, Oracle and/or its affiliates. All rights reserved.

Maybe you are looking for

  • ORA-01403: no data found ---- FRM-40735: WHEN-VALIDATE-ITEM trigger raised

    Scenario: I have one Master Detail form. after entering values in master Form, Navigate to Detail form, there I have to enter more that 5000 lines, it's very tough for user to enter huge amount of data. Workaround: Give one button on Master form and

  • Server Error Message Translation

    I have problems with Translation of server error messages to French. I did the following. Install the french version of oracle client (oraf.msb file exists in oraclehome$\ora92\rdbms\mesg) Changed the language by using ALTER SESSION statement SQL> SE

  • [CS4] Ann.: Wordalizer 1.25 "Create Word Clouds in InDesign"

    Marc Autret is way too modest -- he posted this announcement in the middle of a long thread in the Scripting forum, and I'm sure it deserves much more attention than that! http://www.indiscripts.com/post/2010/04/wordalizer-125-create-word-clouds-in-i

  • More art than science...

    Doctors often describe medicine this way. I find the same to be true of display technology. Why do people obsess over specs and crap? Why do people not trust their eyes? Since I obviously work at Best Buy, I get to see customers in action on a daily

  • Getting error message about Java Script/OSX/Illustrator incompatability. CS6 will not open

    Suddenly, CS6 version of Adobe Illustrator is not opening,. Getting an error message that it requires a "legacy version of Java Runtime." Talked with Apple Customer Service about this and they learned that Oracle is no longer making that version avai