[ 
https://issues.apache.org/jira/browse/CAMEL-14242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16987747#comment-16987747
 ] 

Omar Al-Safi commented on CAMEL-14242:
--------------------------------------

Yes, it seems there is a bug in regards to endpointdsl and RabbitMQComponent 
and I verified it. To give you a context, when you do something like this: 
{code}
rabbitmq("foo")
        .queue("foo")
        .advanced()
        .args(Collections.singletonMap("queue.x-max-priority", "10"));
{code}
The endpointdsl will bootstrap a URI route and parameters. However, these 
parameters that being bootstrapped by the endpointdsl, is taking this shape:
{code}
"queue.x-max-priority" -> "10"
{code}
Meanwhile, the [component expects 
parameters|https://github.com/apache/camel/blob/master/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQComponent.java#L256]
 with prefix appended {{arg.}}, e.g in this form:
{code}
"arg.queue.x-max-priority" -> "10"
{code}
The fix is fairly simple, you just need to check if why args are not assigned 
[here|https://github.com/apache/camel/blob/master/components/camel-rabbitmq/src/main/java/org/apache/camel/component/rabbitmq/RabbitMQComponent.java#L252].
 
However, if you wish, you are encouraged to send a PR to fix this since you 
spent the time to test it and report. Let me know if you are willing to jump on 
this one to fix. 

> camel-rabbitmq - Binding parameters with x- is not possible
> -----------------------------------------------------------
>
>                 Key: CAMEL-14242
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14242
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-rabbitmq
>    Affects Versions: 3.0.0
>            Reporter: michael elbaz
>            Assignee: Omar Al-Safi
>            Priority: Minor
>
> I can' use some rabbitMq parameter eg: *x-max-priority* please provide an 
> working exemple. 
> It was before possible doing that using deprecated parameter 
> *&queueArgsConfigurer=#rabbitMqQueueArgsConfigurer*  
> {code:java}
> @Bean("rabbitMqQueueArgsConfigurer")
> public ArgsConfigurer rabbitMqQueueArgsConfigurer() {
>     return map -> map.put("x-max-priority", 10);
> }
> {code}
> See this one:
> [https://stackoverflow.com/a/44651087/4271976|https://stackoverflow.com/a/44651087/4271976]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to