Throttle Asynchronous MDNs when using webMethods EDIINT Module


We have experienced an issue with a Trading partner who is sending us a very large number of messages over AS/2 and requesting an asynchronous MDN.  From an inbound message perspective, the Trading Partner is restricting inbound to a single payload at a time however, the outbound MDNs are spawning rapidly and filling up our thread pool.  Having no control over this process is dangerous to our environment as a whole.

We would like to see an enhancement where the MDNs do not run through spawned threads.  Instead, we could control throughput by putting the jobs into a job queue (perhaps DB) which could then be processed by a thread pool, which could itself be controlled.


Refer the below steps to achieve the above-mentioned requirements.

  1. Register a BATCH service in TN, Logic:
    1. Input signature: "queue"
    2. Call the service to get the list of queued task for that queue
    3. LOOP over taskids resulted by point b.
    4. Call the service to get the task with content
    5. BRANCH on /task/InputData/bizdoc/SystemStatus; resulted from point d.
    6. Create a SEQUENCE labelled QUEUED
      1. Call the service, mapping the task/InputData/bizdoc with deliveryDocument Input bizdoc
    7. Default is EXIT from $parent.
  2. Create a public QUEUE for registered Batch service
  3. Create a processing rule with following requirements:
    1. Processing rule ordinal should be above Default EDIINT processing rule "EDIINT Send MDN Message"
    2. Select Sender and receiver if you wish
    3. Select the Document Types EDIINT MDN
    4. Specify the User Status as "SendMDNMsg"
    5. Under Extended Criteria, add "EDIINT Delivery URI" Not Equals null
    6. Under Action tab, Select Deliver document by Scheduled delivery and select the created queue in 2nd point.

Complete Solution in the package can be downloaded from attachments (Install as IS package). This package automatically registers a scheduled service with TN; the logic of the service is defined in point 1.  To use the package just follow from point 2 to 3.

This solution has not been tested thoroughly and might have multiple issues and even error handlings and loggings are missing from multiple places, in short, it is not production ready. (11.3 KB)