2

I have an MDB deployed on WebLogic 10.3 which is listening on a JMS queue on Oracle AQ.

The messages are processed without any problem whenever they are being put on the queue. However is there is no message I can see an Oracle error returned in the communication between WebLogic and Oracle AQ:

ORA-25228: timeout or end-of-fetch during message dequeue 

The problem here is that if that error is returned then WebLogic sends a request again and again, so I can see a huge communication between WebLogic and Oracle AQ (1000 requests in 12 minutes).

If I use Spring instead of Message Driven Bean I can see the same problem, however if I add task executor (task-executor attribute) to jms listener container then the communication looks good and the communication between WebLogic and Oracle AQ is done on periodical intervals (every 120 seconds) with an status returned:

ORA-01403: no data found

Anyone has an idea how to configure MDB correctly?

karruma
  • 768
  • 1
  • 12
  • 32

1 Answers1

0

1000 requests in 12 minutes

You can set the *Max_retries* and *Retry_delay* properties for your AQ-QUEUE for set a redelivery limit and a pause beetwen retries.

BEGIN DBMS_AQADM.CREATE_QUEUE(
   Queue_name          => 'MY_QUEUE',
   Queue_table         => 'MY_Q_TABLE',
   Queue_type          =>  0,
   Max_retries         =>  5,
   Retry_delay         =>  0,
   retention_time      =>  86400,
   dependency_tracking =>  FALSE
END;
/
A. A. Vybegallo
  • 246
  • 1
  • 6
  • OK, I have tried that, no change - whatever I set there the error is constantly returned couple of times a second. I am actually looking for a solution that would return me the other error (ORA-01403). I don't really understand why ORA-25228 is returned in this case – karruma Feb 20 '14 at 14:30
  • ORA-01403 usually throws by PL/SQL procedures whan select ... into brokes. Do you use any PL/SQL code for working with AQ? What Oracle DB version are you using? – A. A. Vybegallo Feb 20 '14 at 14:35
  • Both errors are returned depending on the technology used - so I presume that different SQL is being generated - version Oracle 10g 10.2.0.5.0 – karruma Feb 20 '14 at 14:59
  • 1
    If you reading messages via PL/SQL than try set options: v_dequeue_options.wait := 1; OR v_dequeue_options.navigation := dbms_aq.first_message; Check then your messages not in the READY state: SQL> -- Thus ORA-25228 was raised but messages exist in READY state. SQL> select distinct msg_state from aq$test_table where queue = 'TEST_QUEUE'; (replace TEST_QUEUE and aq$test_table to your QUEUE and table). – A. A. Vybegallo Feb 20 '14 at 15:08
  • Thanks for that - I am not using PL/SQL to dequeue the messages, only to enqueue them however the issue is a problem even though there is nothing on the queue. If a message is put onto the queue then it's being picked up and consumed, so there doesn't seem to be a problem with the select. – karruma Feb 20 '14 at 15:21
  • Check that you commit your transaction after enqueue the message. – A. A. Vybegallo Feb 20 '14 at 15:22