2011-05-09 53 views
1

我正在尝试写入通用的pl/sql(重新)入队消息已经入队(以任何状态出现在队列表中)。Oracle AQ的requeue

当在队列上启用出列队列时,它可以正常工作,因此我可以首先在浏览模式下出列,以填充DBMS_AQ.message_properties_t并从现有消息加载。但是,如果出队被禁用,我该如何获取?

DBMS_AQ.enqueue(
     queue_name   => fine, 
     enqueue_options  => fine, 
     message_properties => how from existing message, 
     payload    => how from existing message 
            (probably can select, not big deal), 
     msgid    => fine); 

感谢

回答

1

有是如何做到这一点的Oracle的网站一个很好的例子: http://download.oracle.com/docs/cd/B10500_01/appdev.920/a96587/apexampl.htm

基本上就可以“出列”以非破坏性的方式(IE离队用于浏览的目的)。因为你不是出轨的,所以信息仍然存在。

+0

您好艾伦,我知道了DBMS_AQ.BROWSE模式的但是当队列上的出列队列被禁用时,即使在浏览模式下也会出错。 – 2011-05-09 19:25:31

1

HAVE让出队为了得到一个消息,无论在浏览删除模式:

begin 
    sys.dbms_aqadm.start_queue('[QUEUE_NAME]', true, true); 
end; 
/