0 Replies Latest reply: Apr 22, 2013 8:08 AM by johnb-Oracle RSS

    Simple Queue-Queue Failing with : kwqjaq: Only job queue slave can run prop

    johnb-Oracle
      I know this is a simple problem, but I can't get by it.
      I have two DB servers and I just want to queue a message on a local queue and have it propagated to a remote queue.

      Here are my steps:

      I do this on both databases:

      grant dba to johnb identified by johnb ;


      connect johnb/johnb

      create type my_type as object ( a number, b varchar2(2000), c varchar2(2000)) ;

      --- multi consumer queue
      Begin
      /* This queue table should already exist */
      dbms_aqadm.create_queue_table( queue_table => 'MY_QUEUE_TAB',
      queue_payload_type => 'MY_TYPE',
      multiple_consumers => TRUE,
      comment => 'Test MultiConsumer OAQ',
      compatible => '8.1.0' );
      DBMS_AQADM.CREATE_QUEUE (
      queue_name => 'MY_QUEUE'
      , queue_table => 'MY_QUEUE_TAB' );

      dbms_aqadm.start_queue('MY_QUEUE') ;
      End;
      /


      -- on "Local DB" I do the following:


      DECLARE
      subscriber sys.aq$_agent;
      BEGIN
      subscriber := sys.aq$_agent( 'subscriber1' , 'JOHNB.MY_QUEUE@otmdmz2' , null);
      DBMS_AQADM.ADD_SUBSCRIBER(queue_name => 'JOHNB.MY_QUEUE', subscriber => subscriber);
      END;
      /

      -- scheduling propagation
      BEGIN
      DBMS_AQADM.SCHEDULE_PROPAGATION( queue_name => 'JOHNB.MY_QUEUE' , destination => 'otmdmz2' , destination_queue => 'JOHNB.MY_QUEUE');
      END;
      /

      BEGIN
      DBMS_AQADM.ALTER_PROPAGATION_SCHEDULE( queue_name => 'JOHNB.MY_QUEUE' , destination => 'otmdmz2' , destination_queue => 'JOHNB.MY_QUEUE' , latency => 1 );
      END;
      /


      -- I queue with this

      -- enqueue local

      DECLARE
      enqueue_options DBMS_AQ.enqueue_options_t;
      enqueue_properties DBMS_AQ.message_properties_t;
      enqueue_handle RAW(16) ;
      enqueue_message JOHNB.MY_TYPE;
      BEGIN
      enqueue_message := JOHNB.MY_TYPE(1, 'an aq test','sending to remote db' ) ;
      dbms_aq.enqueue(queue_name => 'JOHNB.MY_QUEUE',
      enqueue_options => enqueue_options,
      message_properties => enqueue_properties,
      payload => enqueue_message,
      msgid => enqueue_handle) ;
      commit ;
      end;
      /



      No messages move to remote DB.
      I can see the message in the local queue table.
      Both databases have the same init.ora parameters : job_queue_processes=1000, aq_tm_processes=1.

      If I attempt to run the job I get the message in the subject line in a trace file:

      kwqjaq: Only job queue slave can run propagation job, exiting


      Though I am sure simple configuration issue, I cannot find a relevant note.

      Thanks,

      John