diff options
Diffstat (limited to 'cpp/demo/IceStorm/replicated/Subscriber.cpp')
-rw-r--r-- | cpp/demo/IceStorm/replicated/Subscriber.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/cpp/demo/IceStorm/replicated/Subscriber.cpp b/cpp/demo/IceStorm/replicated/Subscriber.cpp index 1adafbcd804..8755650cf9f 100644 --- a/cpp/demo/IceStorm/replicated/Subscriber.cpp +++ b/cpp/demo/IceStorm/replicated/Subscriber.cpp @@ -59,18 +59,14 @@ Subscriber::run(int argc, char* argv[]) } // - // Set the requested quality of service "reliability" = - // "batch". This tells IceStorm to send events to the subscriber - // in batches at regular intervals. + // Create the servant to receive the events. // - IceStorm::QoS qos; - qos["reliability"] = "batch"; + Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Clock.Subscriber"); // - // Create the servant to receive the events. + // We want to use oneway batch messages. // - Ice::ObjectAdapterPtr adapter = communicator()->createObjectAdapter("Clock.Subscriber"); - Ice::ObjectPrx clock = adapter->addWithUUID(new ClockI); + Ice::ObjectPrx clock = adapter->addWithUUID(new ClockI)->ice_batchOneway(); IceStorm::TopicPrx topic; Ice::ObjectProxySeq::const_iterator p; @@ -103,7 +99,7 @@ Subscriber::run(int argc, char* argv[]) for(p = topics.begin(); p != topics.end(); ++p) { topic = IceStorm::TopicPrx::uncheckedCast(*p); - topic->subscribe(qos, clock); + topic->subscribeAndGetPublisher(IceStorm::QoS(), clock); } adapter->activate(); |