eBiss 3

Hilfe & Dokumentation

User Tools

Site Tools


Sidebar

en:howtos:plugins:webservices:bundling

Web service request bundling

When you set up a web service, an eBiss job is started for each web service request. This is normally ok.

If clients send you many small requests, you have the option of bundling these web service calls with request bundling:

  • process them in one job and
  • bundle the received documents in one message, e.g. as long as the DocumentRecipient, the DocumentSender and the InterchangeReference remain the same.

This reduces the number of jobs started and running in parallel many times over. And the number of messages created can also be reduced.

You activate request bundling in the code by passing the following parameters to the WebServiceBase base class in the constructor:

  • bundlingMaxSeconds: how long the requests should be accepted for a job and
  • bundlingIdleSeconds: the maximum time to wait after the last web service request has been received. This is not a mandatory parameter.
  • maxRequests: the maximum number of requests to be accepted and thus processed in an eBiss job. If not set, there is no restriction.

A code example:

   [ServiceContract]
   public class ExampleService : WebServiceBase, ISystemVariableConsumer, IRunningJobConsumer
   {
 
       public ExampleService() : base(bundlingMaxSeconds: 120, bundlingIdleSeconds: 10, bundlingMaxRequests: 20)
       {
       }
       ...

It is important for correct processing that the web service method:

  • contains a using(WaitForInitialisation()) at the beginning, which is used to wait for initialisation. The ‘using’ ensures cancellation in error case.
  • at the end within the ‘using’ either:
    • the creation of the message is waited for via a call to WaitForMessageCreated(), or
    • if you have created the message yourself, this is announced by calling MessageCreated().
en/howtos/plugins/webservices/bundling.txt · Last modified: 2025/05/22 13:17 by 127.0.0.1