Modify retention period of workflow queues

Yesterday, there was a requirement to increase the retention period of WF_DEFERRED and WF_BPEL_Q so that the developers could troubleshoot issues involving business events.

This can be done this way:

1. Check the retention period of existing workqueues.

SQL> SELECT owner, name, retention FROM all_queues WHERE name LIKE 'WF%';


OWNER           NAME                                                RETENTION

--------------- --------------------------------------------- ------------------------------
APPS                 WF_BPEL_Q                                                0
APPLSYS         WF_INBOUND_QUEUE                             0
APPLSYS         WF_OUTBOUND_QUEUE                          0
APPLSYS         WF_SMTP_O_1_QUEUE                           0
APPLSYS         WF_DEFERRED_QUEUE_M                        0
APPLSYS         WF_DEFERRED                                            0
APPLSYS         WF_ERROR                                           0
APPLSYS         WF_REPLAY_OUT                                   604800
APPLSYS         WF_IN                                                 604800
APPLSYS         WF_OUT                                              604800
APPLSYS         WF_REPLAY_IN                                      604800
APPLSYS         WF_JMS_IN                                          0
APPLSYS         WF_CONTROL                                       0
APPLSYS         WF_NOTIFICATION_IN                            0
APPLSYS         WF_NOTIFICATION_OUT                         0
APPLSYS         WF_WS_JMS_IN                                    0
APPLSYS         WF_JAVA_DEFERRED                              0
APPLSYS         WF_JAVA_ERROR                                   0
APPLSYS         WF_WS_JMS_OUT                                 0
APPLSYS         WF_JMS_JMS_OUT                                0
APPLSYS         WF_WS_SAMPLE                                   0
APPLSYS         WF_JMS_OUT                                      0

22 rows selected.



Notice that the retention period for WF_BPEL_Q and WF_DEFERRED are set to 0.

2. Increase the retention period of both these queues as below:

exec dbms_aqadm.alter_queue
      (  queue_name => 'APPLSYS.WF_DEFERRED',
         retention_time => 86400  -- in seconds. So, it is for 1 day. 
      );

exec dbms_aqadm.alter_queue
      (  queue_name => 'APPLSYS.WF_BPEL_Q',
         retention_time => 86400 -- in seconds. So, it is for 1 day. 
      );

3. Again, check the retention period of existing workqueues.

SQL> SELECT owner, name, retention FROM all_queues WHERE name LIKE 'WF%';


OWNER           NAME                                                           RETENTION

--------------- ---------------------------------------------           ------------------------------
APPS                WF_BPEL_Q                                                              86400
APPLSYS         WF_INBOUND_QUEUE                                       0
APPLSYS         WF_OUTBOUND_QUEUE                                    0
APPLSYS         WF_SMTP_O_1_QUEUE                                     0
APPLSYS         WF_DEFERRED_QUEUE_M                                  0
APPLSYS         WF_DEFERRED                                                         86400
APPLSYS         WF_ERROR                                                     0
APPLSYS         WF_REPLAY_OUT                                             604800
APPLSYS         WF_IN                                                           604800
APPLSYS         WF_OUT                                                        604800
APPLSYS         WF_REPLAY_IN                                                604800
APPLSYS         WF_JMS_IN                                                     0
APPLSYS         WF_CONTROL                                                  0
APPLSYS         WF_NOTIFICATION_IN                                       0
APPLSYS         WF_NOTIFICATION_OUT                                    0
APPLSYS         WF_WS_JMS_IN                                               0
APPLSYS         WF_JAVA_DEFERRED                                         0
APPLSYS         WF_JAVA_ERROR                                              0
APPLSYS         WF_WS_JMS_OUT                                            0
APPLSYS         WF_JMS_JMS_OUT                                           0
APPLSYS         WF_WS_SAMPLE                                              0
APPLSYS         WF_JMS_OUT                                                 0

22 rows selected.


Notes:

1. Before increasing the retention period, do note that there will be a performance overhead because of this increase. This is because the queue is not cleared till one day and hence, the processing of BES events may become slow.


2. The default value of retention period is 1 day for all the queues.


Comments

Popular posts from this blog

java.lang.ExceptionInInitializerError while trying to Access login page

Solution to "End Program - WMS Idle"

WGET shell Script for downloading patches