Home Help Center

IceStorm

mwilsonmwilson Member Mark WilsonOrganization: Integrated Computer Solutions, Inc.Project: TBD ✭✭✭
Okay, IceStorm is driving me crazy. I've had this working before, but now it doesn't.

All of my proxies are okay, topics exist, etc. (I'm checking all of the return types), but the monitor does not seem to be receiving any info! I start the icebox with:

Ice.Trace.Network=3
IceBox.Service.MSCEventService=IceStormService,21:create
Freeze.DbEnv.MSCEventService.DbHome=MSCdb
MSCEventService.TopicManager.Endpoints=tcp -h cactus -p 9999
MSCEventService.Publish.Endpoints=tcp


I get trace messages (from icebox) when the publisher publishes an event, but nothing happens on the monitor. All return values check out okay in the monitor client, QoS["reliability"] is set to "oneway". Here is the monitor client code (with most of the error checking code removed):

Ice::ObjectPrx obj = communicator()->stringToProxy(
"MSCEventService/TopicManager:tcp -h cactus -p 9999");

IceStorm::TopicManagerPrx topicManager =
IceStorm::TopicManagerPrx::checkedCast(obj);

Ice::ObjectAdapterPtr adapter =
communicator()->createObjectAdapter("MonitorAdapter");

MSC::MonitorPtr monitor = new MonitorI;
Ice::ObjectPrx proxy = adapter->addWithUUID(monitor);

IceStorm::TopicPrx topic;
try
{
topic = topicManager->retrieve("ActuatorControl");
IceStorm::QoS qos;
topic->subscribe(qos, proxy);
}
catch (const IceStorm::NoSuchTopic& ex)
{
std::cerr << "No topic found" << std::endl;
return 0;
}

adapter->activate();

Any idea what I'm doing wrong?

Comments

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

    Your code looks reasonable. Assuming that events are being published on the topic, the most likely reason for a subscriber to not receive them is a network problem, such as the subscriber adapter's endpoint being inaccessible to IceStorm.

    The IceStorm tracing properties should provide more information, and I would also recommend enabling Ice.Trace.Network=2.

    Take care,
    - Mark
Sign In or Register to comment.