From c83708e9bdb97095e1e9ee5f6cc38f7201c33487 Mon Sep 17 00:00:00 2001 From: Tony Roussel Date: Tue, 23 Nov 2021 14:09:50 +0100 Subject: [PATCH] add x-message-deduplication exchange type This exchange type exist on RabbitMQ server with the plugin rabbitmq_message_deduplication This plugin code is available here: https://github.com/noxdafox/rabbitmq-message-deduplication --- include/amqpcpp/exchangetype.h | 3 ++- src/channelimpl.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/amqpcpp/exchangetype.h b/include/amqpcpp/exchangetype.h index 5ef5c7a..66325db 100644 --- a/include/amqpcpp/exchangetype.h +++ b/include/amqpcpp/exchangetype.h @@ -25,7 +25,8 @@ enum ExchangeType direct, topic, headers, - consistent_hash + consistent_hash, + message_deduplication }; /** diff --git a/src/channelimpl.cpp b/src/channelimpl.cpp index 79efeb4..326b355 100644 --- a/src/channelimpl.cpp +++ b/src/channelimpl.cpp @@ -290,6 +290,7 @@ Deferred &ChannelImpl::declareExchange(const std::string &name, ExchangeType typ else if (type == ExchangeType::topic) exchangeType = "topic"; else if (type == ExchangeType::headers) exchangeType = "headers"; else if (type == ExchangeType::consistent_hash) exchangeType = "x-consistent-hash"; + else if (type == ExchangeType::consistent_hash) exchangeType = "x-message-deduplication"; // the boolean options bool passive = (flags & AMQP::passive) != 0;