5#include <slick/queue.hpp>
24 : size_(size), shm_name_(std::move(shm_name)) {}
28 const auto i =
static_cast<size_t>(broker);
30 throw std::invalid_argument(
"no market data request queue for broker " + std::to_string(i));
32 auto& queue = queues_[i];
34 const std::string name = shm_name_.empty() ? std::string() : shm_name_ +
"_" +
to_string(broker);
35 queue = std::make_unique<slick::queue<uint8_t>>(size_, name.empty() ?
nullptr : name.c_str());
45 const auto i =
static_cast<size_t>(broker);
51 std::string shm_name_;
52 std::array<std::unique_ptr<slick::queue<uint8_t>>,
BROKER_COUNT> queues_;
void set_md_request_cursor(BrokerId id, uint64_t cursor) noexcept
static BrokerStatusRegistry & instance()
slick::queue< uint8_t > & get(BrokerId broker)
static constexpr size_t BROKER_COUNT
slick::queue< uint8_t > * find(BrokerId broker) const noexcept
MdRequestQueues(uint32_t size, std::string shm_name={})
const char * to_string(BrokerId bid)
static constexpr uint64_t NO_MD_REQUEST_CURSOR