Hi, I don't think you'll like this answer, but this is actually the "desired behavior" from a WS-N standpoint. Each new call to subscribe() creates a new subscription (ws-resource), and that subscription will notify its subscribers whenever a message is published to its topic. There is no default policy to prevent duplicate consumer reference and topic combinations among the subscription manager's subscriptions, and it would hard to police this anyway given that two EPRs can point to the same consumer.
That said, it should be possible to introduce a (WSN-defined) policy that checks for duplicate consumer references and either throw a fault or return the existing subscription EPR when it happens. the only thing you'd have to watch for on the second scenario is duplicate calls to WSRL Destroy when you wanted to end the subscription(s). I'm not familiar enough with how pubscribe works to tell you how to introduce such a policy, or if you can override one or more methods in the implementation to create the behavior. The JavaDocs don't include any info on their implementation classes, and there is no API for adding/affecting subscription policies. Dan "Muni Reddy" <[EMAIL PROTECTED]> wrote on 06/30/2006 04:31:45 AM: > Hi Dan, > > Thanks for your reply. > > Yes, both notification messages have the same topic value since I have > subscribed for "Comment" property twice from the same consumer. > > > > I am using filesystem example. I didn't add manageability capability topics. > > > > My requirement is whenever changes happen to resource properties; I want > notifications from the notification producer. > > > > The problem is, if the same consumer sends request to subscribe again for > the same property which has subscribed earlier, the notification producer is > sending notification twice to the same consumer for the same property when > change happens to that property. > > > > I was surprised why subscription manager is allowing subscription twice for > the same property (let say "Comment") from the same consumer endpoint? > > > > Is there any way to allow consumer to subscribe only once for one > topic/property? > > > > - Naga Muni Reddy > > > > > On 6/30/06, Daniel Jemiolo <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > Without seeing your project, it's tough to say, but I'm guessing that > > perhaps "Comment" is a resource property, and the two notifications you're > > > > getting are: > > > > 1. the WSRP ResourcePropertyValueChangeNotification > > > > 2. the same notification for the topic representing the manageability > > capability defining "Comment" > > > > The way WSDM defines its capability topics and the way WSRP defines > > property change topics kind of clash in this regard, and that can result > > in two notifications. Is this what's happening? Or do both notification > > messages have the same topic value? > > > > Dan > > > > > > > > > > Dan Jemiolo > > IBM Corporation > > Research Triangle Park, NC > > > > > > +++ I'm an engineer. I make slides that people can't read. Sometimes I eat > > donuts. +++ > > > > > > > > "Muni Reddy" < [EMAIL PROTECTED]> wrote on 06/29/2006 06:44:55 AM: > > > > > Hi, > > > > > > I have implemented muse filesystem example. > > > > > > I have subscribed for a "Comment" topic and getting notification also > > from > > > the notification producer when a change happens to "Comment" topic. > > Again, I > > > have subscribed for a "Comment" topic from the same consumer and getting > > > notifications twice, but I want notification only once for one topic. > > > > > > > > > > > > Is there any way to avoid duplicate subscription from same consumer for > > the > > > same topic? > > > > > > What is soap request to get all topics which are subscribed for > > > notifications? > > > > > > > > > > > > Please let me know on this > > > > > > Regards, > > > Muni > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Regards, > Naga Muni Reddy.D --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
