I was very excited to see the WS-Eventing specification released this week. We've been looking for something just like this for a number of our purposes. As one example, the body of subscription request messages has just the things we need to specifying a content routing subscription:
- where to send content notifications (the content itself)
- where to send notifications of subscriptions ending
- when subscriptions should expire
- a method of specifying filters on the subscriptions
It also has, in the body at least, no baggage that we don't need. By contrast, we have seen other content routing systems require subscribing users to set up rules for the content routing first, and then allow users to register interest in those rules. This creates a manageability issue for subscribing users of having to either identify and search among existing routing rules, or follow a two step process of creating rules and then establishing subscriptions to them, an unnecessarily complex process. I'll be posting more on attributes of easy to use content-based routing later, and what content-based routing adds to the pure web services world that it doesn't have now. Suffice it to say in the meantime, that WS-Eventing has what is needed to do content-based routing subscription and notification.
This is very good news. But I also see a few flaws in the current WS-Eventing specification. WS-Eventing uses the WS-Addressing spec intelligently for several things:
- the endpoint references for content and subscription end notifications are of WS-Addressing EndpointReferenceType
- this includes use of WSA ReferenceProperties within those endpoint references that allows followon messages (subscription responses, content notification responses) must include in their message headers (literally without any surround WS-Addressing or WS-Eventing related header)
- to relate subscription requests and responses (and other request/response message pairs). Specifically responses will have a WS-Addressing RelatesTo header that matches the MessageID content of the request.
These uses make sense, and its great that we don't have to learn a one-off method for these capabilities (endpoint references, reference properties needed by requestors, and correlation of messages). But there remain some unexplained and sometimes inconsistent issues around WS-Eventing's use of WS-Addressing headers:
- Is use of the WS-Addressing headers actually required? It is implied by various aspects of the spec but not actually spelled out. There could be quite a bit of utility for many people to allowing these WS-Eventing conversations to take place via synchronous generic SOAP http requests, using only the SOAP Body content specified (though that content of course correctly uses types from the WS-Addressing spec).
- If use of wsa: headers is required, there is more information that needs to be nailed down in the spec. The spec currently says that wsa:RelatesTo in the header of SubscribeResponse, must be value of the wsa:MessageID of the corresponding request. It doesn't say anything about the wsa:To. Presumably (if use of wsa: headers is required) it must be the value of the wsa:ReplyTo of the request. If the SubscribeResponse is coming back in the http response from a synchronous SOAP request, then perhaps the wsa:To is not necessary. If it is necessary (and population of all wsa: headers is required), then the correct population of it should be described, if only for the sake of consistency.
- There is a dangling element definition called SubscribeTo that is not used anywhere in the schema. I suspect that this is because some method of identifying who to send subscription responses when not using WS-Addressing headers was originally planned. It would be necessary when you didn't have wsa: headers if you were asynchronously responding to a subscription request.
Overall, I think there is some value to allowing the exchange of these WS-Eventing messages (subscribe request/response, unsubscribe request/response, etc.) over generic SOAP non-WSA-supporting transports. This could be done by requiring a synchronous http exchange to effect them without having to do explicit correlation of RelatesTo/Message and To/ReplyTo elements. And yet we could still use the relevant WS-Addressing data types where they help (as noted above). Nevertheless, I can also live with required use of WS-Addressing headers or even a fullfledged WS-Addressing-capable transport (we'll be building a very early an implementation of such anyway). I just think that the WS-Eventing specification should be a little clearer in that case.
These reservations aside, WS-Eventing is a very exciting development. Beyond the fact that it is very good specification (I think the WS-* specs are actually getting better over time), by facilitating the creation of content routing services, it introduces for the first time to the web services world the capability of sending messages for which you do not know the recipient. This is a key building block to enabling rapid integration of many web services and applications around individual business events.