@@ -2782,23 +2782,6 @@ void ClusterQueueHelper::releaseQueueDispatched(
27822782 BSLS_ASSERT_SAFE (
27832783 d_cluster_p->dispatcher ()->inDispatcherThread (d_cluster_p));
27842784
2785- if (d_supportShutdownV2) {
2786- BMQ_LOGTHROTTLE_INFO ()
2787- << d_cluster_p->description ()
2788- << " : Shutting down and skipping close queue [: "
2789- << handleParameters.uri ()
2790- << " ], queueId: " << handleParameters.qId ()
2791- << " , handle parameters: " << handleParameters;
2792- if (callback) {
2793- bmqp_ctrlmsg::Status status;
2794- status.category () = bmqp_ctrlmsg::StatusCategory::E_SUCCESS;
2795- status.message () = " Shutting down." ;
2796- callback (status);
2797- }
2798-
2799- return ; // RETURN
2800- }
2801-
28022785 bmqt::Uri uri (handleParameters.uri ());
28032786 QueueContextMapIter queueContextIt = d_queues.find (uri.canonical ());
28042787 if (queueContextIt == d_queues.end ()) {
@@ -4716,6 +4699,28 @@ void ClusterQueueHelper::configureQueue(
47164699 // PRECONDITIONS
47174700 BSLS_ASSERT_SAFE (d_cluster_p->dispatcher ()->inDispatcherThread (queue));
47184701
4702+ // Application first calls 'Cluster::initiateShutdown' (which may set
4703+ // 'd_supportShutdownV2'), followed by 'TransportManager::closeClients'
4704+ // which may result in 'QueueHandle::drop' leading to this call.
4705+ if (d_supportShutdownV2) {
4706+ // Assuming thread-safe 'description()'
4707+ BMQ_LOGTHROTTLE_INFO ()
4708+ << d_cluster_p->description ()
4709+ << " : Shutting down and skipping close queue [: "
4710+ << handleParameters.uri ()
4711+ << " ], queueId: " << handleParameters.qId ()
4712+ << " , handle parameters: " << handleParameters;
4713+
4714+ if (callback) {
4715+ bmqp_ctrlmsg::Status status;
4716+ status.category () = bmqp_ctrlmsg::StatusCategory::E_SUCCESS;
4717+ status.message () = " Shutting down." ;
4718+ callback (status);
4719+ }
4720+
4721+ return ; // RETURN
4722+ }
4723+
47194724 // TBD: Populate the 'bmqp_ctrlmsg::SubQueueIdInfo' of the handleParameters
47204725 // with subStream-specific (appId, upstreamSubQueueId) if applicable.
47214726 // Note that handleParameters passed here are from the 'QueueContext'
0 commit comments