RMQ - RabbitMQ C++ Library
rmqt_consumerackbatch.h
1// Copyright 2020-2023 Bloomberg Finance L.P.
2// SPDX-License-Identifier: Apache-2.0
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16#ifndef INCLUDED_RMQT_CONSUMERACKBATCH
17#define INCLUDED_RMQT_CONSUMERACKBATCH
18
19#include <rmqt_consumerack.h>
20
21#include <bdlcc_deque.h>
22#include <bslmt_lockguard.h>
23#include <bslmt_mutex.h>
24
25#include <bsl_memory.h>
26#include <bsl_vector.h>
27
28namespace BloombergLP {
29namespace rmqt {
30
32 public:
35
36 bool addAck(const ConsumerAck& ack);
37
38 bsl::vector<ConsumerAck>& lock();
39
40 private:
41 bslmt::Mutex d_mutex;
42 bool d_locked;
43 bsl::vector<ConsumerAck> d_acks;
44};
45
46typedef bdlcc::Deque<bsl::shared_ptr<ConsumerAckBatch> > ConsumerAckQueue;
47
48} // namespace rmqt
49} // namespace BloombergLP
50
51#endif
Definition: rmqt_consumerackbatch.h:31
Definition: rmqt_consumerack.h:24