2 Replies Latest reply: Jun 4, 2013 4:47 AM by 1010658 RSS

    Queue with callback function not dequeuing

    1010658
      Hi,

      I would like to ask you for help or for a hint regarding our problem with the queue:

      A trigger is enqueuing to a queue. This works fine, but the callback function is never called. The queue already worked for a while, but since i changed something at the procedure called by the callback it does not work anymore.
      I already have tried the following:
      -Stopping and restarting
      -Dropping and recreating (with the scheduler having no jobs anymore)
      -Dropping, restarting the database and recreating

      None of these worked. Where do I fail, when considering that the queue with the same scripts worked already? I post the script for creating the queue and adding the subscriber:

      CREATE OR REPLACE TYPE pat_history_queue_payload_type AS OBJECT
      ( TSTAMP VARCHAR2(22 CHAR),
      TYP VARCHAR2(10 CHAR),
      DELTA_MENGE NUMBER,
      ORIGIN VARCHAR2(1 CHAR),
      TEXT VARCHAR2(1000 CHAR),
      QL_TSTAMP VARCHAR2(22 CHAR)
      );

      /

      BEGIN
      DBMS_AQADM.CREATE_QUEUE_TABLE (
      queue_table => 'pat_history_queue_table',
      queue_payload_type => 'pat_history_queue_payload_type',
      multiple_consumers => TRUE
      );
      END;
      /
      BEGIN
      DBMS_AQADM.CREATE_QUEUE (
      queue_name => 'pat_history_queue',
      queue_table => 'pat_history_queue_table',
      max_retries => 10
      );
      DBMS_AQADM.START_QUEUE (
      queue_name => 'pat_history_queue'
      );
      END;
      /
      BEGIN

      DBMS_AQADM.ADD_SUBSCRIBER (
      queue_name => 'pat_history_queue',
      subscriber => SYS.AQ$_AGENT(
      'pat_history_queue_subscriber',
      NULL,
      NULL )
      );

      DBMS_AQ.REGISTER (
      SYS.AQ$_REG_INFO_LIST(
      SYS.AQ$_REG_INFO(
      'pat_history_queue:pat_history_queue_subscriber',
      DBMS_AQ.NAMESPACE_AQ,
      'plsql://PAT.HISTORY_QUEUE_DISTRIBUTION.CALLBACK',
      HEXTORAW('FF')
      )
      ),
      1
      );
      END;
      /

      The function CALLBACK which is called by the queue, is never called, I checked that with log messages. Also the package that contains the function is compiled ok.

      Thanks.

      Roland