aboutsummaryrefslogblamecommitdiffstats
path: root/library/cpp/messagebus/queue_config.cpp
blob: 78fb52ee49bfeb7c0bd0cb360a9c486e998f78b4 (plain) (tree)
1
2
3
4
5
6
7
8
9







                                           
                                          
                                                      
                                               

                                           
 
                                                


                                              
#include "queue_config.h"

using namespace NBus;

TBusQueueConfig::TBusQueueConfig() {
    // workers and listeners configuratioin
    NumWorkers = 1;
}

void TBusQueueConfig::ConfigureLastGetopt(
    NLastGetopt::TOpts& opts, const TString& prefix) {
    opts.AddLongOption(prefix + "worker-count")
        .RequiredArgument("COUNT")
        .DefaultValue(ToString(NumWorkers))
        .StoreResult(&NumWorkers);
}

TString TBusQueueConfig::PrintToString() const {
    TStringStream ss;
    ss << "NumWorkers=" << NumWorkers << "\n";
    return ss.Str();
}