I'm not a fan of the instance subscriptions myself. That said, I assume both of your interfaces are OcassionalConsumerOf?
If you can provide a failing test I'll look into it. On Tue, Sep 11, 2012 at 3:28 PM, Jakub Berezanski <[email protected]>wrote: > Hi, > > I noticed weird behavior on the publisher side when the subscriber is > using AddInstanceSubscription() passing an object that handles two message > types: > - events were not delivered reliably (I'm typing this from memory, sorry > for the vagueness) > - after unsubscribing (calling Dispose on the token returned by > AddInstanceSubscription), only one subscription was cancelled (the other > remained) > > Did not have time to debug this thoroughly, but after a quick look at > instance subscription handling, it seems the dictionaries are keyed only by > instance subscription key (a GUID), the message type is not taken into > account. When subscribing an object handling two message types, two > AddInstanceSubscription messages are sent (for the two message types) with > the same InstanceSubscriptionKey. This confuses the publisher. > > A workaround is to ensure every message type is handled by a distinct > object and call AddInstanceSubscription for each of these handler objects. > In this case each subscription has a distinct ID and everything works > reliably. > > -- > You received this message because you are subscribed to the Google Groups > "Rhino Tools Dev" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/rhino-tools-dev/-/uXMmaq-C254J. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rhino-tools-dev?hl=en. > -- You received this message because you are subscribed to the Google Groups "Rhino Tools Dev" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rhino-tools-dev?hl=en.
