aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/queue_config.cpp
blob: d8f7b4eb22c830692bee34098e772ed192230664 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#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();
}