Archived

This forum has been archived. Please start a new discussion on GitHub.

[IceStorm] - Exchange data between Publisher and Subscriber

AurelienDE
edited April 2017 in Help Center

Hello,

I need to use an application using IceStorm. Here is the context : One "MetaServer" which is Publisher need to ping Subscriber when a special event is coming to him. This Part is ok, this is the sample of the "clock" put on GitHub.

I read all the doc on ZeroC about this and I didn't find what I was searching :

  • Can the Publisher collect Data of the Subscriber ?
  • Can the Publisher be notice when Subscriber is subscribing to himself ?

Example : My subscriber have a list of String, can the Publisher collect this list when the Subscriber is subscribing or at the start of the Publisher if the subscriber had already Subscribed ?

The only way I see is create a client/server on top of Publisher/Subscriber and make action after the ping send by Publisher.

Im sorry for my spelling I am not English native.

Cheers,
AurelienDE

Tagged:

Comments

  • bernard
    bernard Jupiter, FL

    Hi Aurelien,

    You would typically use IceStorm to decouple your publisher(s) and subscriber(s). A publisher sends an event to IceStorm on a given topic, and IceStorm in turn delivers this event to the subscribers of this topic (if there is any). The publishers and subscribers aren't in direct communication.

    You can add of course another layer for communications the other way around if like.

    Can the Publisher collect Data of the Subscriber ?

    With IceStorm, a publisher is just an Ice client (to IceStorm). It does not receive any notification.
    You could host and implement Ice objects in the application that contains your publisher, which would make this application an Ice server. This or these objects could be Ice objects that your subscribers call directly. They could also be "Subscribers", that your subscriber calls through IceStorm (making your subscriber a publisher, most likely on another topic).

    Can the Publisher be notice when Subscriber is subscribing to himself ?

    A subscriber does not subscribe to a publisher but to a topic. And IceStorm does not notify anybody when a subscriber subscribes to a topic.

    The only special feature that IceStorm offers with respect to publishers and subscribers is the ability to get a special publisher object that sends events to a specific topic-subscriber, as opposed to all subscribers of that topic. See https://doc.zeroc.com/display/Ice37/Publishing+to+a+Specific+Subscriber

    This feature is useful to avoid a race condition in some situations. It doesn't seem helpful for what you're try to do.

    Hope this helps!

    Bernard