qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Gazzarini <a.gazzar...@gmail.com>
Subject Implementation of WS-Notifications (QPID-1582)
Date Wed, 11 Feb 2009 14:34:36 GMT
Hi all,
the last step (at the moment) of QMan is here : I just submitted code for
QPID-1582 (implementation on QMan of WS-Notification).

As first version there are only two topics : one for lifecycle events of
object instances (create & remove) and one for lifecycle events (only
create) of events.
That means:

1) There are two topics : qman:ObjectsLifeCycleTopic and
qman:EventsLifeCycleTopic
2) QMan will publish on the first one the following message when (for
example) a connection is created :

<wsnt:NotificationMessage
    xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
    xmlns:qman="http://amqp.apache.org/qpid/management/qman"
    xmlns:qman-wsa="http://amqp.apache.org/qpid/management/qman/addressing"
    xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsnt="
http://docs.oasis-open.org/wsn/b-2">
    <wsnt:SubscriptionReference>
        <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">
http://romagazzarini:8080/qman/services/SubscriptionManager</wsa:Address>
        <wsa:ReferenceParameters xmlns:wsa="
http://www.w3.org/2005/08/addressing">
            <qman-wsa:ResourceId xmlns:qman-wsa="
http://amqp.apache.org/qpid/management/qman/addressing
">09c45414-1adf-4bf1-b855-71c9597176e0</qman-wsa:ResourceId>
        </wsa:ReferenceParameters>
    </wsnt:SubscriptionReference>
    <wsnt:Topic
        Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete"
xmlns:qman="http://amqp.apache.org/qpid/management/qman
">qman:EventsLifeCycleTopic</wsnt:Topic>
    <wsnt:ProducerReference>
        <wsa:ReferenceParameters xmlns:wsa="
http://www.w3.org/2005/08/addressing"/>
        <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">
http://romagazzarini:8080/qman/services/adapter</wsa:Address>
    </wsnt:ProducerReference>
    <wsnt:Message>
        <qman:LifeCycleEvent TimeMillis="1234295015000" Type="CREATED"
xmlns:qman="http://amqp.apache.org/qpid/management/qman">
            <qman:Resource>
                <qman-wsa:ResourceId xmlns:qman-wsa="
http://amqp.apache.org/qpid/management/qman/addressing
">aff2f6ec-2e5c-4768-ae87-6da2c8a005ff</qman-wsa:ResourceId>
                <qman:PackageName>org.apache.qpid.broker</qman:PackageName>
                <qman:Name>connection</qman:Name>
            </qman:Resource>
        </qman:LifeCycleEvent>
    </wsnt:Message>
</wsnt:NotificationMessage>

3) A similar notification (but with type="REMOVED") will be published when
an object instance (a connection for example) is removed

4) For events there are only CREATE notification. So on the second mentioned
topic a message will be published each time an "event" (for example a
subscribe event) is created on QMan (and therefore on Qpid)

Management clients will be able to subscribe to a topic and eventually can
specify a filter and the duration of the subscription.
This is a sample subscribe request :

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
    <soap:Header>
        <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">
http://romagazzarini:8080/qman/services/adapter</wsa:To>
        <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">
http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeRequest
</wsa:Action>
        <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing
">uuid:d0e13e13-63ee-5302-7b41-a1109776d168</wsa:MessageID>
        <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
            <wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous
</wsa:Address>
        </wsa:From>
    </soap:Header>
    <soap:Body>
        <wsnt:Subscribe xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2">
            <wsnt:ConsumerReference>
                <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing
">http://romagazzarini:8080/qman/services/consumer</wsa:Address>
            </wsnt:ConsumerReference>
            <wsnt:Filter>
                <wsnt:TopicExpression
                    Dialect="
http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete" xmlns:qman="
http://amqp.apache.org/qpid/management/qman">qman:ObjectsLifeCycleTopic</wsnt:TopicExpression>
*<-- The client is interested on qman:ObjectsLifeCycleTopic*. *If this
filter is omitted client will receive all messages of all topics*
            </wsnt:Filter>

<wsnt:TerminationTime>2009-02-10T20:56:09+01:00</wsnt:TerminationTime>* <--
Subscription will end on this date*. *If this is omitted the subscription
won't never end.*
        </wsnt:Subscribe>
    </soap:Body>
</soap:Envelope>


Further improvement will be made in order to meet (eventual) management
client needs.

I believe now It's time to write documentation... :) Let's start!

Best regards,
Andrea

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message