Archived
This forum has been archived. Please start a new discussion on GitHub.
about Storm
freshman
in Help Center
there is a subscriber and a publisher,the publisher publishs message sometimes with topic "A" and sometimes with topic"B",I
want subscriber to receive both topics ,can a subscriber subscribe many topics?
BTW, I can definite the message which has a property to make out the two different messages,but it isn't my best choice.
Is there another way to do this?
Thank you!!
want subscriber to receive both topics ,can a subscriber subscribe many topics?
BTW, I can definite the message which has a property to make out the two different messages,but it isn't my best choice.
Is there another way to do this?
Thank you!!
0
Comments
-
Yes, a subscriber can subscribe to multiple topics. If you use the same servant for subscribing to both topics, then both topics must use the same interface definition (because a single servant cannot implement multiple unrelated interfaces).
If the servant needs to know which topic a message came from, you could use a servant locator with a default servant, and then use different identities in the subscriber proxies that are given to the topic manager. The target identity is available to the servant via the Ice::Current parameter.
Take care,
- Mark0
