Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

queue retry delay not working

125693May 11 2010 — edited Aug 25 2011
I have a problem when using retry_delay with a queue.

When a dequeue operation is rolled back, the message in the queue is updated to retry count 1.
But this message is not dequeued anymore, it remains in this state at least for a couple of days. My setup should use a retry_delay of 60 seconds and a retry count of 120 so it should be retried every minute and should be send to the error queue after 2 hours.

This problem occurs in an 11.1.0.7 Database on HP-UX itanium.
Everything works fine on our Testmachine, this Problem only occurs on our customers Database.
The only difference I know is the operating system our Testdatabse runs on linux the one at our customers site runs on HP-UX.

Below are the queue create scripts and a code snippet, that shows teh dequeue operation:


begin
dbms_aqadm.create_queue_table
(
queue_table => 'JOB_QUEUE_TABLE',
queue_payload_type => 'OT_JQD_BASE',
sort_list => 'priority,enq_time'
);

dbms_aqadm.create_queue
(
queue_name => 'JOB_QUEUE',
queue_table => 'JOB_QUEUE_TABLE',
max_retries => 120,
retry_delay => 60
);

dbms_aqadm.start_queue
(
queue_name => 'JOB_QUEUE'
);

commit;
end;
/


procedure job( p_include_long_run_knz in number, p_max_wait_time in number )
is
v_options dbms_aq.dequeue_options_t;
v_message_properties dbms_aq.message_properties_t;
v_msgid raw(32000);
v_jqd_base ot_jqd_base;
e_max_wait_time exception;
pragma exception_init( e_max_wait_time, -25228 );
begin
v_options.wait := p_max_wait_time;

loop
begin
dbms_aq.dequeue
(
queue_name => pa_db_properties.pc_po_schema_name || '.JOB_QUEUE',
dequeue_options => v_options,
message_properties => v_message_properties,
payload => v_jqd_base,
msgid => v_msgid
);

-- ... execute message handling, and sometimes throw an exception

exception
when e_max_wait_time then
rollback;
exit;
when others then
rollback; -- in this case i would expect the retry handling for the queue
end;
end loop;
end;
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 8 2011
Added on May 11 2010
4 comments
2,441 views