Home Help Center

agent that subscribes to and publishes multiple topics.

We would like to implement a distributed agent architecture for a System Health Management Testbed, using the IceStorm publish-subscribe service. The distributed system would usually involve 6 - 12 agents sharing data over about a dozen topics.

Are there any examples where individual applications publish several topics and subscribe to several topics at the same time? In the IceStorm example (clock)that comes with the ice software download, both the Publisher and the Subscriber classes inherit from Application. The Application class only allows one thread.


  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi Chris,

    The Application class doesn't place any restrictions on the number of threads your program uses. Perhaps you're thinking of the fact that Application is a singleton class and therefore a program can only create one instance of it?

    Take care,
    - Mark
  • C. NeukomC. Neukom Member
    agent that subscribes to and publishes multiple topics

    Yes, how can I create multiple instances of a publisher or subscriber in a single application. The singleton class seems to prevent that (it causes an error).
  • marcmarc FloridaAdministrators, ZeroC Staff Marc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications Engine ZeroC Staff
    I don't understand what multiple publishers or subscribers have to do with the Ice::Application singleton class, and why it would prevent you from doing so. What error do you get exactly?

    Regardless of whether you use Ice::Application or initialize the communicator by hand, you simply subscribe to multiple topics or publish to different topics. There is no special trick here. Whether you use the main thread or create your own threads does not matter. What problem do you exactly have?
Sign In or Register to comment.