dequeue timeout NOT timing out
Hi, we have an application that uses the pure JDBC drivers and the AQ api to dequeue messages off an 8.1.7.2 queue with object payloads. We user navigation next message and the queue properties are:
owner : QUEUEMGR
name : FXD_QUEUE
queue table : FXD_MSG_QUEUE
[AQQueueProperty]
type : NORMAL
max_retries : 0
retry_interval : 0.0
retention_time : 0.0
dep_tracking : false
comment : null
auto_commit : true
Payload type : OBJECT
Users enqueue messages through a stored procedure, which after calling enqueue it goes into a loop checking the queue table for the existence of that message every few ms. If the message does not leave the queue within 5 seconds, an error is thrown to the user. We are experiencing a problem with the queue in that sometimes the dequeue call would block for a very long time (1, 2 even 4 minutes) as if there were no messages, while on the same time users where getting errors thrown as they were enqueueing messages that were not received within 5 seconds. We tried to work around that by setting the dequeue timeout to 2 seconds, hoping that unblocking and calling dequeue again would work, and we added very verbose logging to know exactly where the time is spent.
While normally our log file looks like:
[Wed Sep 11 15:07:17 GMT+03:00 2002],Informative,OracleAQRetriever: Dequeue timeout due to inactivity.
[Wed Sep 11 15:07:17 GMT+03:00 2002],Informative,Calling blocking dequeue on AQ Api
[Wed Sep 11 15:07:19 GMT+03:00 2002],Informative,OracleAQRetriever: Dequeue timeout due to inactivity.
[Wed Sep 11 15:07:19 GMT+03:00 2002],Informative,Calling blocking dequeue on AQ Api
[Wed Sep 11 15:07:21 GMT+03:00 2002],Informative,OracleAQRetriever: Dequeue timeout due to inactivity.
[Wed Sep 11 15:07:21 GMT+03:00 2002],Informative,Calling blocking dequeue on AQ Api
[Wed Sep 11 15:07:23 GMT+03:00 2002],Informative,OracleAQRetriever: Dequeue timeout due to inactivity.
[Wed Sep 11 15:07:23 GMT+03:00 2002],Informative,Calling blocking dequeue on AQ Api
[Wed Sep 11 15:07:25 GMT+03:00 2002],Informative,Blocking dequeue returned message
[Wed Sep 11 15:07:25 GMT+03:00 2002],Informative,OracleAQRetriever: processing msg from dequeue call
At random intervals we get :
[Wed Sep 11 15:07:43 GMT+03:00 2002],Informative,OracleAQRetriever: Dequeue timeout due to inactivity.
[Wed Sep 11 15:07:43 GMT+03:00 2002],Informative,Calling blocking dequeue on AQ Api
[Wed Sep 11 15:08:56 GMT+03:00 2002],Informative,Blocking dequeue returned message
[Wed Sep 11 15:08:56 GMT+03:00 2002],Informative,OracleAQRetriever: processing msg from dequeue call
which means that now we called dequeue at 15:07:43, there was a meesage so there was no reason to timeout. The method returned over a minute
later with a message.
Is there anything that could be causing it not to timeout every 2 seconds?
Is there anything that could be causing it not to dequeue the message immediately but with a huge delay?
Kind regards,
alex