ORA-24033: no recipients for message

tolywang發表於2014-07-26

       When we try to enqueue messages on this queue now, we receive an ORA-24033: no recipients for message.  This means we need to set up subscribers first. If we enqueue without a recipient list, the message will be made available for all subscribers.

  
      To add a subscriber, we use the dbms_aqadm package and a new object_type: sys.aq$_agent.

This type is defined as an object of name , address and protocol. The last 2 are used in inter-system communication only.
   
We can just call the following procedure:
 
DECLARE
V_agent sys.aq$_agent;
BEGIN
   V_agent:= sys.aq$_agent('Agent1',NULL,NULL);
   DBMS_AQADM.ADD_SUBSCRIBER(queue_name=>'xxx_mc_test_q'
      ,subscriber=>v_agent);
END;

 
We can see the subscribers from the view aq$xxx_mc_test_s (or the underlying table: aq$_xxx_mc_test_s):


select * from aq$xxx_mc_test_s;
 
QUEUE        NAME   ADDRESS      PROTOCOL TRANSFORMATION
————– —— ——-     ——– ————–
XXX_MC_TEST_Q AGENT1              0    


參考:   

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-1231891/,如需轉載,請註明出處,否則將追究法律責任。

相關文章