SAP PO – How to enable a handling of large messages in the Messaging System

You have to remeber. Concurrent processing of large messaging in the messaging system queue could lead to out of memory errors due to heap being exhausted. A message is considered to be #large# if it exceeds the threshold for large messages. In order to be processed, the message must have a specific number of permits (the number of permits is the message size divided by the threshold).

Per default the permit size is 10 MB and 10 permits are available. This means that large messages will be processed in parallel if 100 MB are not exceeded.

Example from SAP source.

Let us assume we have 5 messages waiting to be processed (status “To Be Delivered” on one server node. Message A has 5 MB, message B has 10 MB, message C has 50 MB, message D 150 MB, message E 50 MB and message F 40 MB. Message A is not considered large since the size is smaller than the permit size and is not considered large and can be immediately processed. Message B requires 1 permit, message C requires 5. Since enough permits are available processing will start (status DLNG). Hence for message D all available 10 permits would be required. Since the permits are currently not available it cannot be scheduled. If blacklisting is enabled the message will be put to error status (NDLV) since it exceed the maximum number of defined permits. In that case the message would have to be restarted manually. Message E requires 5 permits and can also not be scheduled. But since there are 4 permits left message F is put to DLNG. Due to the smaller size message B and message F finish first releasing 5 permits. This is sufficient to schedule message E which requires 5 permits. Only after message E and C have finished message D can be scheduled consuming all available permits.

How to enable funcionality of large messages

To configure Large Message Handling go to http://:/nwa and open the Java System Properties using NWA –> Configuration –> Infrastructure –> Java System Properties.

Go to the Services tab page and search for the service name XPI Service: Messaging System. In extended details search: large:

messaging.largemessage.enabled: This parameter needs to be converted from false to true.

Description of the above parameters:

messaging.largemessage.enabled - Value type: Boolean - Activates on large memory handling in PI messaging system, default value false (deactivated).

messaging.largemessage.permits - Value type: Integer - Defines the total number of permits available for each AS Java server node. Default value: 10.

messaging.largemessage.queueTypes - Value type: String - Defines the types of queues for which large message handling is activated. Default value is " (empty string), similar to the maxReceivers it implies Send and Recv queue types for each adapter.

messaging.largemessage.threshold - Value type: Integer - Defines the threshold for large messages in kilobytes. Default value is 10240 or 10 MB.

messaging.largemessage.blacklistXLMessage - Value type: Boolean - Determines whether a message larger than the threshold multiplied by the total number of permits should be blacklisted. The default value is false, which means that message processing will commence when the message can obtain the total number of permits.

Keep in mind the large message queue handling is based on the Messaging System queues. This means that restricting the parallelization is only possible after the initial persistence of the message in the Messaging System queues. Therefore if You have a very high parallel load of incoming large requests this feature will not help. Instead You would have to restrict the size of incoming requests on the sender channel (e.g. file size limit in the file adapter or the icm/HTTP/max_request_size_KB limit in the ICM for incoming HTTP requests).

Copyright © 2022. SAPBasisWorld.com Privacy Policy