RMQ - RabbitMQ C++ Library
rmqt_queueunbinding.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_QUEUEUNBINDING
17#define INCLUDED_RMQT_QUEUEUNBINDING
18
19#include <rmqt_binding.h>
20#include <rmqt_exchange.h>
21#include <rmqt_fieldvalue.h>
22#include <rmqt_queue.h>
23
24#include <bsl_ostream.h>
25#include <bsl_string.h>
26
27namespace BloombergLP {
28namespace rmqt {
29
34
35class QueueUnbinding : public Binding {
36 public:
37 QueueUnbinding(const ExchangeHandle& exchange,
38 const QueueHandle& queue,
39 const bsl::string& bindingKey,
40 const rmqt::FieldTable& args = rmqt::FieldTable())
41 : Binding(bindingKey, args)
42 , d_exchange(exchange)
43 , d_queue(queue)
44 {
45 }
46
47 const QueueHandle& queue() const { return d_queue; }
48 const ExchangeHandle& exchange() const { return d_exchange; }
49
50 friend bsl::ostream& operator<<(bsl::ostream& os,
51 const QueueUnbinding& queue);
52
53 private:
54 ExchangeHandle d_exchange;
55 QueueHandle d_queue;
56};
57
58bsl::ostream& operator<<(bsl::ostream& os, const QueueUnbinding& queue);
59
60} // namespace rmqt
61} // namespace BloombergLP
62#endif
An AMQP binding.
Definition: rmqt_binding.h:31
Binding(const bsl::string &bindingKey, const rmqt::FieldTable &args=rmqt::FieldTable())
Constructor.
Definition: rmqt_binding.h:36
An AMQP queue unbinding.
Definition: rmqt_queueunbinding.h:35
Represents AMQP 0.9.1 Field Table (dict of FieldValues)
Definition: rmqt_fieldvalue.h:108