Archived

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

IceStorm how publish to a specific "live" subscriber

Hello and congrats for your great product.

We are planning to use IceStorm to send control messages in a distributed network of servers.

Those servers could be deployed in complex topologies, so we are thinking to deploy on icegrid nodes too. IceGridNode and Admin will make live cycle of our servers.

Each server should be a subscriber of a specific topic, so broadcast control messages, one of case uses, can be commited in a simply manner by our management tool.

However, our tool should be enabled to select a specific subscriber and send a message to this specific server.

Im stuck.

I did search forum. I did compile and made modification to the iceStorm samples and read the docs. In section 44.6 of "Distributed Programming with Ice", Publishing to a Specific Subscriber, i made the sample code, but not works for me because the sample sentences only send a message to a new local subcriber created specifically. The doc suggest an Observer pattern, if I understand each time a subscriber call subscribeAndGetPublisher, should save the generated proxy in a list to all Observers (in a topic to notify all observers)

Well, question, exists some Ice api to find the proxy of a "live" preexistent subscriber so I can send a message to this subscriber only ? How ? thanks and regards.

Comments

  • bernard
    bernard Jupiter, FL
    Hi Jaime,

    Welcome to our user forum!

    IceStorm is a publish-subscribe service, based on topics: subscribers register interest in one of more topics, publishers publish events on topics, and IceStorm deliver the events. Publishers and subscribers are decoupled, and IceStorm does not provide an API to retrieve the subscribers registered with a given topic (or retrieve all registered subscribers).

    The best solution if you need this feature is probably to write your own service/server; this service could wrap IceStorm if you also need topic-based publish-subscribe.

    Best regards,
    Bernard
  • HI Bernard, just solve the problem with a method in the slice definition with a input param of type Object*, then we pass the suscriber ObjectPrx to the publisher, like a callback, so the publisher can invoke the suscriber method specifically.


    we are testing and works, we shall continue testing, thank you.
  • bernard
    bernard Jupiter, FL
    Hi Jaime,

    Thank you for this update. It's good to hear you found a solution.

    Best regards,
    Bernard