Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This section explains, through an example scenario, how the Channel Purger EIP can be implemented using WSO2 ESB. The following topics are covered:

Table of Contents

...

  1. Start the ESB server and log into its management console UI (https://localhost:9443/carbon). In the management console, navigate to the Main Menu, click Service Bus and then Source View menu and click Source View in the Service Bus section. Next, copy and paste the following configuration, which helps you explore the example scenario, to the source view.

    Anchor
    step3
    step3

    Code Block
    languagehtml/xml
    linenumberstrue
    <definitions xmlns="http://ws.apache.org/ns/synapse">
       <sequence name="fault">
          <log level="full">
             <property name="MESSAGE" value="Executing default &#34;fault&#34; sequence"/>
             <property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
             <property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
          </log>
          <drop/>
       </sequence>
       <sequence name="main">
          <store messageStore="PurgedData"/>
       </sequence>
       <messageStore name="PurgedData"/>
    </definitions>
  2. Send several stock quote requests to the message store using the following command.
    ant stockquote -Dtrpurl=http://localhost:8280/ -Dsymbol=foo

Simulating the sample scenario
Anchor
simulating-scenario
simulating-scenario

 Now that the message store is filled with several requests, let's delete some of them using the ESB management console.

...