diff options
author | Matthew Newhook <matthew@zeroc.com> | 2007-01-31 05:20:18 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2007-01-31 05:20:18 +0000 |
commit | aee8b7cff90d42cd1151ec9911e490b0de553dd5 (patch) | |
tree | 75b49c8837bb98683d9451c5c9edc4427e22924c /cpp/demo/IceStorm/replicated/Subscriber.cpp | |
parent | updated README. (diff) | |
download | ice-aee8b7cff90d42cd1151ec9911e490b0de553dd5.tar.bz2 ice-aee8b7cff90d42cd1151ec9911e490b0de553dd5.tar.xz ice-aee8b7cff90d42cd1151ec9911e490b0de553dd5.zip |
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=1690,
http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=1711
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(); |