when destructing a Tagger class, we now also unset the error-callback (closes #480), at the same time we changed the version number in the Makefile (closes #481)
This commit is contained in:
parent
c273d93625
commit
c93f2d89ac
2
Makefile
2
Makefile
|
|
@ -3,7 +3,7 @@ INCLUDE_DIR = ${PREFIX}/include
|
||||||
LIBRARY_DIR = ${PREFIX}/lib
|
LIBRARY_DIR = ${PREFIX}/lib
|
||||||
export LIBRARY_NAME = amqpcpp
|
export LIBRARY_NAME = amqpcpp
|
||||||
export SONAME = 4.3
|
export SONAME = 4.3
|
||||||
export VERSION = 4.3.15
|
export VERSION = 4.3.17
|
||||||
|
|
||||||
all:
|
all:
|
||||||
$(MAKE) -C src all
|
$(MAKE) -C src all
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,15 @@
|
||||||
/**
|
/**
|
||||||
* Reliable.h
|
* Reliable.h
|
||||||
*
|
*
|
||||||
* A channel wrapper based on AMQP::Throttle that allows message callbacks to be installed
|
* A channel wrapper based on AMQP::Tagger that allows message callbacks to be installed
|
||||||
* on the publishes, to be called when they are confirmed by the message broker.
|
* on the publish-confirms, to be called when they a confirmation is received from RabbitMQ.
|
||||||
|
*
|
||||||
|
* You can also change the base class and use Reliable<Throttle> if you not only
|
||||||
|
* want to be notified about the publish-confirms, but want to use it for automatic
|
||||||
|
* throttling at the same time.
|
||||||
*
|
*
|
||||||
* @author Michael van der Werve <michael.vanderwerve@mailerq.com>
|
* @author Michael van der Werve <michael.vanderwerve@mailerq.com>
|
||||||
* @copyright 2020 Copernica BV
|
* @copyright 2020 - 2022 Copernica BV
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,14 @@
|
||||||
/**
|
/**
|
||||||
* Tagger.h
|
* Tagger.h
|
||||||
*
|
*
|
||||||
* Base class that enables publisher confirms and keeps track of the sent messages.
|
* Base class that enables publisher confirms and keeps track of the sent
|
||||||
|
* messages. You can wrap this class around a AMQP::Channel object and use
|
||||||
|
* this object for publishing instead. This is a base class that you cannot
|
||||||
|
* use directly. You should instead use:
|
||||||
|
*
|
||||||
|
* - Throttle: to throttle traffic to prevent flooding RabbitMQ
|
||||||
|
* - Reliable<Tagger>: to be notified about publish-confirms via callbacks
|
||||||
|
* - Reliable<Throttle>: to have throttle + notifications via callbacks
|
||||||
*
|
*
|
||||||
* @author Michael van der Werve <michael.vanderwerve@mailerq.com>
|
* @author Michael van der Werve <michael.vanderwerve@mailerq.com>
|
||||||
* @copyright 2020 Copernica BV
|
* @copyright 2020 Copernica BV
|
||||||
|
|
@ -101,7 +108,7 @@ public:
|
||||||
/**
|
/**
|
||||||
* Virtual destructor
|
* Virtual destructor
|
||||||
*/
|
*/
|
||||||
virtual ~Tagger() = default;
|
virtual ~Tagger();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to check how many messages are still unacked.
|
* Method to check how many messages are still unacked.
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,15 @@ Tagger::Tagger(Channel &channel) : _implementation(channel._implementation)
|
||||||
_implementation->onError([this](const char *message) { reportError(message); });
|
_implementation->onError([this](const char *message) { reportError(message); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destructor
|
||||||
|
*/
|
||||||
|
Tagger::~Tagger()
|
||||||
|
{
|
||||||
|
// restore the error-callback
|
||||||
|
_implementation->onError(nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Send method for a frame
|
* Send method for a frame
|
||||||
* @param id
|
* @param id
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue