RMQ - RabbitMQ C++ Library
rmqp_producertracing.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_RMQP_PRODUCERTRACING
17#define INCLUDED_RMQP_PRODUCERTRACING
18
19#include <rmqt_properties.h>
20
21#include <bsl_memory.h>
22#include <bsl_string.h>
23
24namespace BloombergLP {
25namespace rmqt {
26class Endpoint;
27class ConfirmResponse;
28} // namespace rmqt
29namespace rmqp {
30
40 public:
41 class Context {
42 public:
46 virtual void response(const rmqt::ConfirmResponse& confirm);
47
48 virtual ~Context();
49 };
50
60 virtual bsl::shared_ptr<Context> createAndTag(
61 rmqt::Properties* messageProperties,
62 const bsl::string& routingKey,
63 const bsl::string& exchangeName,
64 const bsl::shared_ptr<const rmqt::Endpoint>& endpoint) const = 0;
65
66 virtual ~ProducerTracing();
67};
68
69} // namespace rmqp
70} // namespace BloombergLP
71
72#endif
Definition: rmqp_producertracing.h:41
virtual void response(const rmqt::ConfirmResponse &confirm)
an opportunity to add details to the context based on the servers response to the send
Definition: rmqp_producertracing.cpp:21
An interface for ProducerTracing class.
Definition: rmqp_producertracing.h:39
virtual bsl::shared_ptr< Context > createAndTag(rmqt::Properties *messageProperties, const bsl::string &routingKey, const bsl::string &exchangeName, const bsl::shared_ptr< const rmqt::Endpoint > &endpoint) const =0
create a (tracing) context with relevant pieces of the producer context and tag the messageProperties...
An AMQP publisher confirm response.
Definition: rmqt_confirmresponse.h:33
Properties is an minimal abstraction of the properties one can set on a message.
Definition: rmqt_properties.h:73