Assembly: mindtouch.dream
Class:MindTouch.Dream.PubSubService
SID: sid://services.mindtouch.com/dream/s...2008/10/pubsub
Assembly: mindtouch.dream.bus.xmpp
Class:MindTouch.Dream.Bus.Xmpp.MessageBusSubscriberService
SID: sid://services.mindtouch.com/dream/s...008/10/subxmpp
The EventSubscriber accepts subscription sets from subscribers and filters and propagates messages it receives accordingly. In general, the location of an EventPublisher will be provided by the environment to each service via the <uri.subservice> configuration value. The URI provided in the configuration value is rooted at {service}/subscribe, so that subscription calls are done against the provided URI, without the postfix.
| Verb:Suffix | Description |
| POST:subscribe | Initialize subscriptions from a subscription set |
| GET:subscribe | Retrieve the combined subscription set |
| GET:subscribe/{subscription-location} | Retrieve present subscription set |
| PUT:subscribe/{subscription-location} | Replaces an existing subscription set |
| DELETE:subscribe/{subscription-location} | Delete an existing subscription set at the location |
| POST:register | Allow an upstream subscriber to register itself to listen to subscriptions |
| DELETE:register | Remove a registration |
<subscription-set max-failures="...">
<!-- the uri of the service registering the subscription set -->
<uri.owner>...</uri.owner>
<!-- the set can have 1 or more subscription blocks. @id will be assigned by
the server if none was provided -->
<subscription id="...">
<!-- each subscription can include 1 or more channels. Channels are OR-ed
for matching events -->
<channel>channel:///some/channel</channel>
...
<!-- There can be zero or one filter elements. Filters are opaque to the subscriber
and represent a contract between the publication and subscription endpoints.
Filter contracts must be rooted by a single elements, since the subscriber
will combine many filter sets to push the subscriptions upstream, so elements
may become intermingled. -->
<filter>
...
</filter>
<!-- There can be zero or one proxy. If it exists it is used as the
destination for matched events -->
<uri.proxy>...</uri.proxy>
<!-- There can be 1 or more recipients. If there is more than one recipient
a proxy must be defined. If the event has recipients, the intersection
between event and subscription recipients is used to filter matches.
@auth-token is used upstream to qualify recipients for an event -->
<uri.recipient auth-token="...">...</uri.recipient>
...
</subscription>
...
</subscription-set>
Channels are URIs. There generalized format is:
{system}://{instance}/{action-path}
In subscription sets, channels accept wild cards at the instance or end of action. The following are all valid channel patterns:
channel://*/some/exact/path deki://some-instance/wildcard/path/* channel://*/*
Register a subscription set with the EventSubscriber which is used to filter and dispatch incoming events. Matching events are dispatched to the the uri.recipient or uri.proxy in the event format specified for EventPublisher. If the EventSubscriber is one in a chain of pub/sub services, it builds a combined subscription set from all subscriptions for all recipients it handles and posts it to the upstream publisher as its subscription set.
Xml document following the subscription set specified above.
| Status | Response Body | Description |
| Created (201) | -- | operation completed successfully. Response contains Location header |
| Conflict (409) | -- | A set for that owner already exists. Response contains a Content-Location header for the location of the conflicting subscription set |
Retrieve the combined subscription set that the EventSubscriber pushes to an upstream subscriber
| Status | Response Body | Description |
| OK (200) | text/xml | operation completed successfully |
Retrieve a subscription set, along with each subscriptions statistics
| Status | Response Body | Description |
| OK (200) | text/xml | operation completed successfully |
Replace an existing subscription set
| Status | Response Body | Description |
| OK (200) | -- | operation completed successfully |
Remove an existing subscription set
| Status | Response Body | Description |
| OK (200) | -- | operation completed successfully |
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by