PI AEX 7.5 Message Retention Settings
This topic is valid for Configuring Process Integration (PI) Dual-Stack as well as for Configuring Advanced Adapter Engine Extended (PI-AEX). The message retention period is the length of time that messages are kept in the message store in a final state (successful, cancelled) before they are archived. This blog explains the parameter settings to be defined to enable Message Retention in PI Systems. I have tested these parameters in AEX 7.5 system and found that they do not require a restart of the services.
Parameters for Message Retention
Below are the parameters which control global retention period considering there is no scenario specific retention period configured.This global retention period applies to all scenarios for which you have not defined a scenario-specific retention period.
Parameter for asynchronous messages –
xiadapter.inbound.persistDuration.default (configured to default 1 day)
xiadapter.outbound.persistDuration.default (configured to default 1 day)
Parameter for synchronous messages –
messaging.log.RetainTime (configured to default 7 days)
Once the settings have been changed, the retention period can be verified for both type of messages under message monitor by checking “Persist Until” field under message details.
Synchronous messages will show “Persist Until” equal to 1/1/1970 as these are kept in memory cache of message store and not in DB by default. Please check sap note 2351322 for more details.
Messages with error status will not be removed from database by archiving/deletion job even their retention periods expired. Therefore, you will be able to see the messages with error status beyond your message retention setting is configured.
Synchronous messages will show “Persist Until” equal to 1/1/1970 as these are kept in memory cache of message store and not in DB by default (Note 2351322).
In case you want to configure Scenario-Specific Message Retention Periods follow the below steps. Scenario-specific message retention periods can be configured longer or shorter than the global default, but they must not be shorter than 1 day:
- Choose SAP NetWeaver Administrator.
- Choose the SOA tab, and then Monitoring Message Retention .
- Choose Create.
- Define filters and rules for particular scenarios by filling out the displayed header data. You can use wildcards.
Cleanup Jobs scheduled in PI for Messages
There are two standard PI message clean-up/deletion jobs scheduled i.e IdocDBTableCleanup and “Default Delete Job” however , the IdocDBTableCleanup job only deletes the entries from IDoc_AAE table once the messages are deleted by the delete job and have a retention period of 30 days by default. Default delete job do not delete more stuff apart from deleting messaging therefore, no change is required at the jobs.