RMQ - RabbitMQ C++ Library
rmqa_tracingconsumerimpl.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_RMQA_TRACINGCONSUMERIMPL
17#define INCLUDED_RMQA_TRACINGCONSUMERIMPL
18
19#include <rmqa_consumerimpl.h>
20
21#include <bsl_memory.h>
22#include <bsl_vector.h>
23#include <bsls_keyword.h>
24
25//@PURPOSE: Provide a RabbitMQ Async Tracing Consumer API
26//
27//@CLASSES:
28// rmqa::Consumer: a RabbitMQ Async Tracing Consumer object
29
30namespace BloombergLP {
31
32namespace rmqt {
33class Endpoint;
34}
35namespace rmqamqp {
36class ReceiveChannel;
37}
38namespace rmqp {
39class ConsumerTracing;
40class MessageTransformer;
41} // namespace rmqp
42
43namespace rmqa {
44
46 public:
48 public:
49 Factory(const bsl::shared_ptr<rmqt::Endpoint>& endpoint,
50 const bsl::shared_ptr<rmqp::ConsumerTracing>& tracing);
51
52 virtual bsl::shared_ptr<ConsumerImpl> create(
53 const bsl::shared_ptr<rmqamqp::ReceiveChannel>& channel,
54 rmqt::QueueHandle queue,
55 const bsl::shared_ptr<rmqa::ConsumerImpl::ConsumerFunc>& onMessage,
56 const bsl::string& consumerTag,
57 bdlmt::ThreadPool& threadPool,
58 rmqio::EventLoop& eventLoop,
59 const bsl::shared_ptr<rmqt::ConsumerAckQueue>& ackQueue,
60 const bsl::vector<bsl::shared_ptr<rmqp::MessageTransformer> >&
61 transformers) const BSLS_KEYWORD_OVERRIDE;
62
63 private:
64 bsl::shared_ptr<rmqt::Endpoint> d_endpoint;
65 bsl::shared_ptr<rmqp::ConsumerTracing> d_tracing;
66 };
67
68}; // class TracingConsumerImpl
69
70} // namespace rmqa
71} // namespace BloombergLP
72
73#endif // ! INCLUDED_RMQA_CONSUMERIMPL
Definition: rmqa_consumerimpl.h:57
Definition: rmqa_tracingconsumerimpl.h:47
Definition: rmqa_tracingconsumerimpl.h:45