aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/queue_config.cpp
blob: 5d430970fe58401a89fd5f00a5dd30658ab70a68 (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(); 
}