Versions Compared

Key

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

...

The WS-Notification SE can be used to provide publish/subscribe routing in the JBI bus. There are several usage:

Configuration using JBI packaging

The servicemix-wsn2005 accepts deployment of Service Units.
The SU must contain one or more files with an xml extension, each one containing a single WS-Notification request. The currently supported set of requests include:

The requests will be started in this very order, so that you can create a PullPoint and create a Subscription for it inside the same service unit.

...

To expose the NotificationBroker and CreatePullPoint services using HTTP/SOAP, you can deploy the following configuration file to servicemix-http:

Code Block
langxml
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
       xmlns:wsn="http://servicemix.org/wsnotification">

  <http:endpoint service="wsn:NotificationBroker"
                 endpoint="http-binding"
                 targetService="wsn:NotificationBroker"
                 targetEndpoint="Broker"
                 role="consumer"
                 locationURI="http://localhost:8192/Broker/"
                 defaultMep="http://www.w3.org/2004/08/wsdl/in-out" 
                 soap="true"/>	               

  <http:endpoint service="wsn:CreatePullPoint"
                 endpoint="http-binding2"
                 targetService="wsn:CreatePullPoint"
                 targetEndpoint="Broker"
                 role="consumer"
                 locationURI="http://localhost:8192/CreatePullPoint/"
                 defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
                 soap="true"/>

</beans>

...

The publisher proxy is a simple component that wraps incoming JBI exchanges into WS-Notification notify requests and send them to a notification broker on the given topic. This could also be written in plain spring style:

...

When the component is started, it registers itself as a publisher to the WS-Notification broker. To do so, it activates a JBI endpoint named subscription so it can handle demand based publishing. When this component receives an InOnly exchange, let's say <hello>world</hello>, it will wrap it in a request as shown here and send the request as an InOnly exchange to the NotifiationBroker. Note that, as this component activates two JBI endpoints, you need to explicitely target the endpoint specified in the activationSpec when sending a message.

...