diff --git a/src/groups/mqb/mqbblp/mqbblp_queuehandle.cpp b/src/groups/mqb/mqbblp/mqbblp_queuehandle.cpp index b5d269dcfe..4462a999b9 100644 --- a/src/groups/mqb/mqbblp/mqbblp_queuehandle.cpp +++ b/src/groups/mqb/mqbblp/mqbblp_queuehandle.cpp @@ -39,6 +39,7 @@ #include // BDE +#include #include #include #include @@ -537,11 +538,6 @@ QueueHandle::QueueHandle( 5 * bdlt::TimeUnitRatio::k_NS_PER_S); // One maximum log per 5 seconds - d_throttledSubscriptionInfo.initialize( - 10, - 5 * bdlt::TimeUnitRatio::k_NS_PER_S); - // Ten per 5 seconds - setHandleParameters(handleParameters); } @@ -610,12 +606,14 @@ void QueueHandle::registerSubscription(unsigned int downstreamSubId, const bmqp_ctrlmsg::ConsumerInfo& ci, unsigned int upstreamId) { - if (d_throttledSubscriptionInfo.requestPermission()) { - BALL_LOG_INFO << "QueueHandle [" << this - << "] registering Subscription [id = " << downstreamId - << ", downstreamSubQueueId = " << downstreamSubId - << ", upstreamId = " << upstreamId << "]"; - } + static const int k_MAX_INSTANT_MESSAGES = 10; + static const bsls::Types::Int64 k_NS_PER_MESSAGE = + bdlt::TimeUnitRatio::k_NANOSECONDS_PER_SECOND; + BALL_LOGTHROTTLE_INFO(k_MAX_INSTANT_MESSAGES, k_NS_PER_MESSAGE) + << "QueueHandle [" << this + << "] registering Subscription [id = " << downstreamId + << ", downstreamSubQueueId = " << downstreamSubId + << ", upstreamId = " << upstreamId << "]"; const bsl::shared_ptr& subStream = downstream(downstreamSubId); @@ -717,12 +715,13 @@ bool QueueHandle::unregisterSubStream( itSubscription != d_subscriptions.end();) { const SubscriptionSp& subscription = itSubscription->second; if (subscription->d_downstreamSubQueueId == downstreamSubQueueId) { - if (d_throttledSubscriptionInfo.requestPermission()) { - BALL_LOG_INFO << "Queue '" << d_queue_sp->description() - << "' handle " << this - << " removing Subscription " - << itSubscription->first; - } + static const int k_MAX_INSTANT_MESSAGES = 10; + static const bsls::Types::Int64 k_NS_PER_MESSAGE = + bdlt::TimeUnitRatio::k_NANOSECONDS_PER_SECOND; + BALL_LOGTHROTTLE_INFO(k_MAX_INSTANT_MESSAGES, k_NS_PER_MESSAGE) + << "Queue '" << d_queue_sp->description() << "' handle " + << this << " removing Subscription " + << itSubscription->first; itSubscription = d_subscriptions.erase(itSubscription); } else { diff --git a/src/groups/mqb/mqbblp/mqbblp_queuehandle.h b/src/groups/mqb/mqbblp/mqbblp_queuehandle.h index 9a3abe8fdc..8854b6e093 100644 --- a/src/groups/mqb/mqbblp/mqbblp_queuehandle.h +++ b/src/groups/mqb/mqbblp/mqbblp_queuehandle.h @@ -196,8 +196,6 @@ class QueueHandle : public mqbi::QueueHandle { bdlmt::Throttle d_throttledDroppedPutMessages; - bdlmt::Throttle d_throttledSubscriptionInfo; - mwcu::OperationChain d_deconfigureChain; // Mechanism to serialize execution of // the substream deconfigure callbacks @@ -665,7 +663,7 @@ inline QueueHandle::Downstream::Downstream(const bsl::string& appId, bslma::Allocator* allocator_p) : d_appId(appId) , d_upstreamSubQueueId(upstreamSubQueueId) -, d_data(new (*allocator_p) +, d_data(new(*allocator_p) mqbi::QueueHandle::UnconfirmedMessageInfoMap(allocator_p), allocator_p) {