[
https://issues.apache.org/jira/browse/CAMEL-14407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Arnaud Chotard updated CAMEL-14407:
-----------------------------------
Attachment: 2020-01-15 16_40_28-RabbitMQ Management.png
> Add a consumerTag on the RabbitMQ camel endpoint
> ------------------------------------------------
>
> Key: CAMEL-14407
> URL: https://issues.apache.org/jira/browse/CAMEL-14407
> Project: Camel
> Issue Type: Improvement
> Components: camel-rabbitmq
> Affects Versions: 2.24.2
> Reporter: Arnaud Chotard
> Priority: Major
> Attachments: 2020-01-15 16_40_28-RabbitMQ Management.png
>
>
> What do you think about adding a consumerTag to the Camel RabbitMQ endpoint ?
> The consumerTag allows you to specify a client-generated consumer tag to
> establish context when invoking channel.basicConsume() :
> {code:java}
> String basicConsume(String queue, boolean autoAck, String consumerTag,
> boolean noLocal, boolean exclusive, Map<String, Object> arguments, Consumer
> callback) throws IOException;{code}
> The evolution to realize is simple.
> 1/ Add the consumerTag in the RabbitMQEndpoint class:
> {code:java}
> @UriParam (label = "consumer")
> private String consumerTag = "";{code}
> 2/ Use the consumerTag in the RabbitConsumer class:
> {code:java}
> @Override
> protected void doStart () throws Exception {
> if (channel == null) {
> throw new IOException ("The RabbitMQ channel is not open");
> }
> tag = channel.basicConsume (consumer.getEndpoint(). getQueue(),
> consumer.getEndpoint().isAutoAck(), consumer.getEndpoint().getConsumerTag(),
> false, consumer.getEndpoint().isExclusiveConsumer(), null, this);
> }{code}
> NB : This functionnality exists on Spring AMQP through the
> org.springframework.amqp.support.ConsumerTagStrategy interface.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)