BPMDeleteDurableMessages command
The BPMDeleteDurableMessages command deletes old durable subscription messages from the LSW_DUR_MSG_RECEIVED database table.
Durable subscription messages exist and persist in the
LSW_DUR_MSG_RECEIVED database table if durable subscriptions are enabled
for message events or content events of the following types:
- intermediate
- boundary
- start events of event subprocesses
The BPMDeleteDurableMessages command is run using the AdminTask object of the wsadmin scripting client.
Prerequisites
Note: In an environment with
multiple security domains configured, use the PALService MBean instead
of this wsadmin command. See The Process Application LifeCycle (PAL) MBean.
The following
conditions must be met:
- Run the command in the connected mode; that is, do not use the wsadmin -conntype none option.
- You cannot use this command to delete messages for BPEL processes.
- You can run the command from any cluster member in a network deployment environment. However, you must first establish the wsadmin session to the SOAP port of the cluster member from where you are running the command.
- To access the wsadmin command, the ID being used must have the WebSphere® Application Server administrator role. See Administrative roles for information about roles.
- To access the IBM® BPM API used
by this command, the ID being used must belong to either the bpmAdminGroup
or bpmAuthorGroup. The default name for the bpmAdminGroup is tw_admins
and the default name for the bpmAuthorGroup is tw_authors. See IBM Business Process Manager default group types for information about groups.Tip: By default, only the DeAdmin user has both the WebSphere Application Server administrator role and membership in the bpmAdminGroup.
Location
Start the wsadmin scripting client from the install_root/profiles/deployment_manager_profile/bin directory.
Syntax
BPMDeleteDurableMessages
-olderThan age_in_days
[-maximumDuration number_of_minutes]
[-transactionSlice number_of_messages]
Parameters
- -olderThan age_in_days
- Specifies an age in days. Durable subscription messages that are
older than the specified age are deleted when the command is run.
This parameter is required.Tip: A day is interpreted as a period of 24 hours rather than as a calendar day. For example, if you specify a value of 3 for the -olderThan parameter, it is interpreted as 72 hours rather than as 3 calendar days. As a result, all durable subscription messages that are older than 72 hours will be deleted when you run the command. However, durable subscription messages that were created 3 calendar days ago, but less than 72 hours ago, will not be deleted
- -maximumDuration number_of_minutes
- Specifies the maximum duration of the deletion operation in minutes. The default value is 0 (which is equivalent to an unlimited number of minutes). When the maximum duration is exceeded, the command is aborted after the current transaction has committed. This parameter is optional.
- -transactionSlice number_of_messages
- Specifies the number of durable subscription message instances that are deleted with each transaction. The default value is 1000. This parameter is optional.
Example
wsadmin -conntype SOAP -port 8880 -host ProcessServer01.mycompany.com -user admin -password admin -lang jython
wsadmin>AdminTask.BPMDeleteDurableMessages( ['-olderThan', '30', '-maximumDuration', '60', '-transactionSlice', '100' ] )