2 Replies Latest reply on Apr 25, 2012 4:39 PM by joe_boy12

    Configure gateway listener to receive single message at a time

    dbuttery

      Hi all,

       

          Looking for a way to throttle messages that are being processed by the listener and placed on the action pipeline.

       

          Currently, I have a gateway listener that uses a custom composer and listens for messages on a WMQ queue.  In this configuration the gateway listener receives messages off the queue and hands them off to the ESB listener as quickly as possible.  This causes the WMQ queue to be emptied as quickly as possible.

       

          I would like to configure this so that messages are only removed from the WMQ queue when the previous message has finished processing on the action pipeline.

       

          Is there a way to configure the provider/listener to obtain this behavior?

       

      Thanks,

      -Dennis

        • 1. Re: Configure gateway listener to receive single message at a time
          tcunning

          You can configure the listener to have only one thread, but I don't think that achieves the behavior you are looking for.      This seems like something that you could possibly write into your custom composer - with some way (database?) of tracking what the last message was, and polling for whether it is finished.

          • 2. Re: Configure gateway listener to receive single message at a time
            joe_boy12

            try lock-step delievry mechanism

             

            <service category="Test" description="Test Service" invmScope="GLOBAL" name="TestService">
            <property name="inVMLockStep" value="true"/>
            <property name="inVMLockStepTimeout" value="4000"/>

            <actions mep="OneWay">
              <action class="org.jboss.soa.esb.actions.SystemPrintln" name="printMessage">
               <property name="message" value="Incoming to Test"/>
              </action>
            </actions>
            </service>