|
|
|
|||||
|
Publisher and Subscriber
I'm building an IceStorm app where every Ice object is both a publisher and subscriber to a topic.
Is there a way to stop the subscriber from receiving the events published from the same object? I could be going about this totally wrong because I just started working with Ice. Thanks, Pete |
|
||||||
|
There is currently no way to do that. This would be a form of event filtering, a feature which is quite common to event publishing systems. If you are interested in sponsoring the addition of such a feature to IceStorm please contact sales@zeroc.com.
Without event filtering one way to do what you want is to put some piece of metadata in the event context -- such as the sender object id. In the subscriber you then look at the data, and throw out the event if the object-id matches your own object id. |
|
|||||
|
I wish I could sponsor it. I'm just a poor college kid though, haha. Sorry guys.
I knew that I could just do it on the application side, but I wanted to avoid that expensive operation all together. If the publisher and subscriber reside in the same app, is Ice smart enough to not send the data over the network and instead use the loopback or some other means? This event filtering functionality will be necessary for the application we're building. Do you see this coming anytime in the near future? Thanks, Pete Last edited by sly596 : 03-02-2008 at 11:09 PM. |
|
|||||
|
Quote:
Pete |
|
|||||
|
Application is a publisher and subscriber to a topic(s)
Hi ZeroC Staff /Pete,
I have just started using Ice/IceStorm yesterday and am a total middleware novice. I'm looking to build a working prototype system where by every process is both a publisher and a subscriber, possibly on different topics. I am using C# and have tried to get this approach working but am not having much luck. both my subscriber and publisher classes make use of the same slice output file and inherit from Ice.Application and reside within the same namespace. Further i 'new' these objects from within their own threads from the application main but Im not getting the results I expect. Is there a preferred or known way to organize the classes that inherit from Ice.Application so they can both publish and subscribe, or is there an alternative mechanism/technique that can be used? Thanks very much Warren |
|
||||||
|
Hi Warren,
Ice.Application is a convenient class for creating Ice applications, in resume it takes care of initialize Ice runtime when the application start and cleanup it when the application finish, you can get more details of Ice.Application in Ice manual, note that Ice.Application does not affect to your subscriber or publiser roll with IceStorm, being a publisher or a subscriber is only a matter of use the convenient IceStorm mechanism, You should read IceStorm chapter of Ice manual and look IceStorm demos to check the details. If after revise these materials you still have problems with use IceStorm, you can ask here your concrete problem and we will happy to help you. Note that for use IceStorm you don´t need to use Ice.Application but most of the time you want to use it as it simplified the task of initialize the Ice runtime, but you still could initialize/cleanup the runtime in your code if that is more convenient for your concrete use case. Regards, José Last edited by xdm : 08-13-2008 at 05:22 PM. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Can subscriber be activated by publisher on demand? | delloby | Help Center | 4 | 08-08-2007 10:19 AM |
| about Subscriber and Publisher | terminate | Help Center | 1 | 04-27-2007 01:44 PM |
| about publisher/subscriber | rellik78 | Help Center | 1 | 09-15-2006 04:34 AM |
| IceStorm publisher and subscriber in the same process | istvan | Help Center | 2 | 05-25-2005 05:26 AM |
| minimal subscriber/publisher demo | zhaiyl | Help Center | 1 | 03-29-2004 06:32 AM |