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
This commit is contained in:
Tony Roussel 2021-11-23 14:09:50 +01:00
parent b891cc37a6
commit c83708e9bd
2 changed files with 3 additions and 1 deletions

View File

@ -25,7 +25,8 @@ enum ExchangeType
direct,
topic,
headers,
consistent_hash
consistent_hash,
message_deduplication
};
/**

View File

@ -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;