Skip to content

Commit

Permalink
Merge branch 'main' into 240630_messageguid_hasher
Browse files Browse the repository at this point in the history
  • Loading branch information
678098 authored Jul 29, 2024
2 parents ea502da + 522a01c commit 7baf372
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/groups/mqb/mqbblp/mqbblp_queueengineutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,14 @@ QueueEngineUtil_AppState::QueueEngineUtil_AppState(
d_autoSubscription.d_evaluationContext_p =
&d_routing_sp->d_queue.d_evaluationContext;

d_throttledEarlyExits.initialize(1, 5 * bdlt::TimeUnitRatio::k_NS_PER_S);
const mqbcfg::AppConfig& brkrCfg = mqbcfg::BrokerConfig::get();
const int maxActionsPerInterval = (brkrCfg.brokerVersion() ==
bmqp::Protocol::k_DEV_VERSION)
? 32
: 1;

d_throttledEarlyExits.initialize(maxActionsPerInterval,
5 * bdlt::TimeUnitRatio::k_NS_PER_S);
}

QueueEngineUtil_AppState::~QueueEngineUtil_AppState()
Expand Down Expand Up @@ -1329,10 +1336,8 @@ Routers::Result QueueEngineUtil_AppState::selectConsumer(
Routers::Result result = d_routing_sp->selectConsumer(visitor,
currentMessage);
if (result == Routers::e_NO_CAPACITY_ALL) {
const mqbcfg::AppConfig& brkrCfg = mqbcfg::BrokerConfig::get();
if (brkrCfg.brokerVersion() == bmqp::Protocol::k_DEV_VERSION ||
d_throttledEarlyExits.requestPermission()) {
BALL_LOG_INFO << "Queue '" << d_queue_p->description()
if (d_throttledEarlyExits.requestPermission()) {
BALL_LOG_INFO << "[THROTTLED] Queue '" << d_queue_p->description()
<< "', appId = '" << d_appId
<< "' does not have any subscription "
"capacity; early exits delivery at "
Expand Down

0 comments on commit 7baf372

Please sign in to comment.