blob: 5172bd37e92d24ecce743539ed6b0019769ba46b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include "messagebus.h"
#include <vespa/messagebus/routing/retrytransienterrorspolicy.h>
#include <vespa/vespalib/util/size_literals.h>
namespace mbus {
MessageBusParams::MessageBusParams() :
_protocols(),
_retryPolicy(new RetryTransientErrorsPolicy()),
_maxPendingCount(1024),
_maxPendingSize(128_Mi)
{ }
MessageBusParams::~MessageBusParams() {}
uint32_t
MessageBusParams::getNumProtocols() const
{
return _protocols.size();
}
IProtocol::SP
MessageBusParams::getProtocol(uint32_t i) const
{
return _protocols[i];
}
MessageBusParams &
MessageBusParams::addProtocol(IProtocol::SP protocol)
{
_protocols.push_back(protocol);
return *this;
}
} // namespace mbus
|