diff options
author | Benoit Foucher <benoit@zeroc.com> | 2017-02-06 15:08:37 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2017-02-06 15:08:37 +0100 |
commit | c28648f6e1a35cdbf5b4b6e2c3b93511a1823726 (patch) | |
tree | 279646e29dab3a08ae0cc5073188c50ed775f098 /cpp/test/IceStorm/single/Subscriber.cpp | |
parent | Merge remote-tracking branch 'origin/3.6' (diff) | |
download | ice-c28648f6e1a35cdbf5b4b6e2c3b93511a1823726.tar.bz2 ice-c28648f6e1a35cdbf5b4b6e2c3b93511a1823726.tar.xz ice-c28648f6e1a35cdbf5b4b6e2c3b93511a1823726.zip |
Fixed ICE-7558 - Reduce chances to lose datagrams by tuning the buffer size and adding dedicated thread pools
Diffstat (limited to 'cpp/test/IceStorm/single/Subscriber.cpp')
-rw-r--r-- | cpp/test/IceStorm/single/Subscriber.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cpp/test/IceStorm/single/Subscriber.cpp b/cpp/test/IceStorm/single/Subscriber.cpp index db3365f4f7c..802bd5d83c4 100644 --- a/cpp/test/IceStorm/single/Subscriber.cpp +++ b/cpp/test/IceStorm/single/Subscriber.cpp @@ -207,23 +207,25 @@ run(int, char* argv[], const CommunicatorPtr& communicator) // Use a separate adapter to ensure a separate connection is used for the subscriber // (otherwise, if multiple UDP subscribers use the same connection we might get high // packet loss, see bug 1784). + communicator->getProperties()->setProperty("UdpAdapter3.ThreadPool.Size", "1"); ObjectAdapterPtr adpt = communicator->createObjectAdapterWithEndpoints("UdpAdapter3", "udp"); subscribers.push_back(new SingleI(communicator, "datagram")); Ice::ObjectPrx object = adpt->addWithUUID(subscribers.back())->ice_datagram(); subscriberIdentities.push_back(object->ice_getIdentity()); - topic->subscribeAndGetPublisher(IceStorm::QoS(), object); adpt->activate(); + topic->subscribeAndGetPublisher(IceStorm::QoS(), object); } { // Use a separate adapter to ensure a separate connection is used for the subscriber // (otherwise, if multiple UDP subscribers use the same connection we might get high // packet loss, see bug 1784). + communicator->getProperties()->setProperty("UdpAdapter4.ThreadPool.Size", "1"); ObjectAdapterPtr adpt = communicator->createObjectAdapterWithEndpoints("UdpAdapter4", "udp"); subscribers.push_back(new SingleI(communicator, "batch datagram")); Ice::ObjectPrx object = adpt->addWithUUID(subscribers.back())->ice_batchDatagram(); subscriberIdentities.push_back(object->ice_getIdentity()); - topic->subscribeAndGetPublisher(IceStorm::QoS(), object); adpt->activate(); + topic->subscribeAndGetPublisher(IceStorm::QoS(), object); } adapter->activate(); |