Skip to Content

You create a scenario using specific adapter. There are a large volume of messages processed in this scenario. To avoid many messages in To be delivered status and processed slowly, you need to assign sufficient work threads. You may be wondering how to increase the value of Maximum Number of Threads for a specific adapter / a specific queue (for example, SOAP_http://sap.com/xi/XI/SystemCall). Here I will introduce how to tune the queue comsumer threads for different adapters in PI/PO system.

1) For some normal adapters (SOAP, RFC, JDBC, JMS, File, HTTP_AAE, IDoc_AAE……), you can add a new property set for the specific Adapter in the property “messaging.connectionDefinition”. This is appended after the global AFW entry.

You can set the custom value for property “messaging.connectionDefinition” in


-> NWA

-> Configuration

-> Infrastructure

-> Java System properties

-> Services

-> XPI Service: AF Core

91Capture.PNG

or

-> ConfigTool (- \usr\sap\<SID>\<Instance ID>\j2ee\configtool)

-> template – Usage_Type_All_in_One

-> services

-> com.sap.aii.af.svc

90Capture.PNG

****Please restart the system after saving these changes in NWA or in ConfigTool. Then the change will take effect and the Maximum Number of Threads for these adapters in Engine Status will be updated as expected.*****

  • For example, increasing the value of Call.maxConsumers for SOAP adapter from default value 5 to 10

(name=global, messageListener=localejbs/AFWListener, exceptionListener=localejbs/AFWListener, pollInterval=60000, pollAttempts=60,

Send.maxConsumers=5, Recv.maxConsumers=5, Call.maxConsumers=5, Rqst.maxConsumers=5) (name=SOAP_http://sap.com/xi/XI/System,  messageListener=localejbs/AFWListener, exceptionListener=localejbs/AFWListener, pollInterval=60000, pollAttempts=60,  Send.maxConsumers=5, Recv.maxConsumers=5, Call.maxConsumers=10, Rqst.maxConsumers=5)

  • For example, increasing the value of maxConsumers for all the queues of File adapter from 5 to 8

(name=global, messageListener=localejbs/AFWListener, exceptionListener=localejbs/AFWListener, pollInterval=60000, pollAttempts=60,  Send.maxConsumers=5, Recv.maxConsumers=5, Call.maxConsumers=5, Rqst.maxConsumers=5) (name=File_http://sap.com/xi/XI/System,  messageListener=localejbs/AFWListener, exceptionListener=localejbs/AFWListener, pollInterval=60000, pollAttempts=60,  Send.maxConsumers=8, Recv.maxConsumers=8, Call.maxConsumers=8, Rqst.maxConsumers=8)

****Please pay attention to the name part, it would be better to check the correct adapter name in Engine status. It should be case-insensitive. If you use the name=FILE_http://sap.com/xi/XI/System, the custome value can be saw in NWA or in ConfigTool, however it does not really take effect and the Maximum Number of Threads for File adapter in Engine Status will not be updated as expected.*****

  • For example, increasing the value of Send.maxConsumers for SFTP adapter from 5 to 10

(name=global, messageListener=localejbs/AFWListener, exceptionListener=localejbs/AFWListener, pollInterval=60000, pollAttempts=60,  Send.maxConsumers=5, Recv.maxConsumers=5, Call.maxConsumers=5, Rqst.maxConsumers=5) (name=SFTP_http://sap.com/xi/XI/SFTP, messageListener=localejbs/AFWListener, exceptionListener=localejbs/AFWListener, pollInterval= 60000, pollAttempts=60, Send.maxConsumers=10, Recv.maxConsumers=5, Call.maxConsumers=5, Rqst.maxConsumers=5)

****Please pay attention to the name part, it would be better to check the correct adapter name in Engine status. It should be “name=SFTP_http://sap.com/xi/XI/SFTP“, not “name=SFTP_http://sap.com/xi/XI/System“.****


  • For example, increasing the value of maxConsumers for File adapter and SFTP adapter together


(name=global, messageListener=localejbs/AFWListener, exceptionListener=localejbs/AFWListener, pollInterval=60000, pollAttempts=60,  Send.maxConsumers=5, Recv.maxConsumers=5, Call.maxConsumers=5, Rqst.maxConsumers=5) (name=File_http://sap.com/xi/XI/System,  messageListener=localejbs/AFWListener, exceptionListener=localejbs/AFWListener, pollInterval=60000, pollAttempts=60,  Send.maxConsumers=8, Recv.maxConsumers=8, Call.maxConsumers=8, Rqst.maxConsumers=8) (name=SFTP_http://sap.com/xi/XI/SFTP, messageListener=localejbs/AFWListener, exceptionListener=localejbs/AFWListener, pollInterval= 60000, pollAttempts=60, Send.maxConsumers=10, Recv.maxConsumers=5, Call.maxConsumers=5, Rqst.maxConsumers=5)


sftp11Capture.PNG


2) For Integrated Configuration Object (ICO) scenarios, the message processing occurs exclusively in the MS Sender queues (Send.maxConsumers for asynchronous outbound and Call.maxConsumers for synchronous outbound). To ensure sufficient work threads, you can consider to increase the number of Send.maxConsumers and Call.maxConsumers for specific adapter. The value of Recv.maxConsumers and Rqst.maxConsumers will not be considered in ICO scenarios.


*******

Related Notes/Documents:


SAP Note 1623356 – “To be delivered” messages in Adapter Engine

SAP Note 1557036 – Integrated Configuration Objects (ICO) scenarios use Messaging System Sender Queues only

Messaging System queue properties after XI 3.0 SP19 / XI 7.0SP11

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Eng Swee Yeoh

    Hi Tina

    Whilst it is useful to know how to increase the adapter threads as part of a wider tuning strategy for the system, IMHO I think it should be noted that it should not be increased just because threads hanging in status To Be Delivered have used up all the assigned threads.

    Messages going into To Be Delivered status could be:-

    i) Temporary in this status due to slow processing at receiver end

    ii) Permanently in this status due to hanging threads.

    Increasing the threads alone will not solve those that are due to (ii) as it does not address the actual reason causing the threads to hang.

    Regards

    Eng Swee

    (0) 
    1. Tina You Post author

      Hi Eng Swee,

      Thanks for your advice. I improved the background description now. You are right, if there are messages stuck in Delivering/ To be delivering due to hanging threads for a long time, it would be better to capture thread dumpsa and analyze the thread usage further.

      Best regards,

      Tina

      (0) 

Leave a Reply