Versions Compared

Key

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

...

The respond token refers to a <respond> element, which is used to stop further processing of a message and send the message back to the client:.

Code Block
XML
XML
<respond/>

...

As with other mediators, after adding the Respond mediator to a sequence, you can click its up and down arrows to move its location in the sequence.

Example

Let's assume Assume that you have a configuration that sends the request to the Stock Quote service and changes the response value when the symbol is WSO2 or CRF. Let's also Also assume that you want to temporarily change the configuration so that if the symbol is CRF, the ESB just sends the message back to the client without sending it to the Stock Quote service or performing any additional processing. To achieve this, you can add the Respond mediator at the beginning of the CRF case as shown below. All configuration after the Respond mediator is ignored, so you can safely leave . As a result, the rest of the CRF case configuration is left intact, allowing you to easily revert to the original behavior in the future simply by removing the Respond mediator.

...