AMQP::Tagger now takes a std::string_view
This commit is contained in:
parent
48b9f05677
commit
e841b3ff69
|
|
@ -11,7 +11,7 @@
|
|||
* - Reliable<Throttle>: to have throttle + notifications via callbacks
|
||||
*
|
||||
* @author Michael van der Werve <michael.vanderwerve@mailerq.com>
|
||||
* @copyright 2020 Copernica BV
|
||||
* @copyright 2020 - 2023 Copernica BV
|
||||
*/
|
||||
|
||||
/**
|
||||
|
|
@ -128,10 +128,10 @@ public:
|
|||
* @param flags optional flags
|
||||
* @return uint64_t
|
||||
*/
|
||||
uint64_t publish(const std::string &exchange, const std::string &routingKey, const Envelope &envelope, int flags = 0);
|
||||
uint64_t publish(const std::string &exchange, const std::string &routingKey, const std::string &message, int flags = 0) { return publish(exchange, routingKey, Envelope(message.data(), message.size()), flags); }
|
||||
uint64_t publish(const std::string &exchange, const std::string &routingKey, const char *message, size_t size, int flags = 0) { return publish(exchange, routingKey, Envelope(message, size), flags); }
|
||||
uint64_t publish(const std::string &exchange, const std::string &routingKey, const char *message, int flags = 0) { return publish(exchange, routingKey, Envelope(message, strlen(message)), flags); }
|
||||
uint64_t publish(const std::string_view &exchange, const std::string_view &routingKey, const Envelope &envelope, int flags = 0);
|
||||
uint64_t publish(const std::string_view &exchange, const std::string_view &routingKey, const std::string_view &message, int flags = 0) { return publish(exchange, routingKey, Envelope(message.data(), message.size()), flags); }
|
||||
uint64_t publish(const std::string_view &exchange, const std::string_view &routingKey, const char *message, size_t size, int flags = 0) { return publish(exchange, routingKey, Envelope(message, size), flags); }
|
||||
uint64_t publish(const std::string_view &exchange, const std::string_view &routingKey, const char *message, int flags = 0) { return publish(exchange, routingKey, Envelope(message, strlen(message)), flags); }
|
||||
|
||||
/**
|
||||
* Close underlying channel
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ void Tagger::reportError(const char *message)
|
|||
* @param flags optional flags
|
||||
* @return uint64_t
|
||||
*/
|
||||
uint64_t Tagger::publish(const std::string &exchange, const std::string &routingKey, const Envelope &envelope, int flags)
|
||||
uint64_t Tagger::publish(const std::string_view &exchange, const std::string_view &routingKey, const Envelope &envelope, int flags)
|
||||
{
|
||||
// @todo do not copy the entire buffer to individual frames
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue