Versions Compared

Key

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

...

Code Block
XML
XML
<event xmlns="http://ws.apache.org/ns/synapse" topic="" [expression=""] />

...

UI Configuration

The configuration options parameters available for configuring the Event Mediator mediator are as follows:

Parameter NameDescription
Topic Type

The type of topic. The available options are as follows.

  • Static: If this is selected, the topic to which the events are published is a static value.
  • Dynamic

...

  • : If this is selected, the topic to which the events are published is a dynamic value that should be derived via an XPath expression.
Topic

The topic to which the events

...

should be published.

...

You can

...

enter a static

...

value or an XPath expression based on the option you selected for the Topic Type parameter.

Info
titleTip

You can click NameSpaces to add namespaces when you are providing an expression. Then the Namespace Editor panel would appear where you can provide any number of namespace prefixes and URLs used in the XPath expression. 

Expression

The XPath expression used to build the message to be published to the specified topic.

Info
titleTip

You can click NameSpaces to add namespaces when you are providing an expression. Then the Namespace Editor panel would appear where you can provide any number of namespace prefixes and URLs used in the XPath expression. 

Info
titleNote

You can configure the Mediator mediator using XML. Click on " switch to source view " in the "Mediator" window.

Image Modified

...

Examples

In this example, when an event notification comes to the EventingProxy proxy service, they are processed by the PublicEventSource sequence, which logs the messages and publishes them to the topic SampleEventSource. Services that subscribe to the topic SampleEventSource will then receive these messages.

Code Block
XML
XML
<!-- Simple Eventing configuration -->
 <definitions xmlns="http://ws.apache.org/ns/synapse">

     <sequence name="PublicEventSource" >
            <log level="full"/>
            <event topic="SampleEventSource"/>
     </sequence>

     <proxy name="EventingProxy">
         <target inSequence="PublicEventSource" />
     </proxy>
 </definitions>

In this scenario, when an event notification comes to the EventingProxy proxy service, they are processed by the PublicEventSource sequence, which logs the messages and publishes them to the topic SampleEventSource. Services that subscribe to the topic SampleEventSource will then receive these messages.

...

Sample

See the following sample for another example.

 Sample 460: Introduction to Eventing and Event Mediator.