Issue
Working with SpringBoot, Java 11.
In application.properties i want to configure: camel.component.rabbitmq.args
Documentation by camel using rabbitmq: https://camel.apache.org/components/3.18.x/rabbitmq-component.html#_message_body
Note: I'm not asking about rabbit, just the configuration in application.
Error i have received trying to configure by my way:
application.properties
camel.component.rabbitmq.args={arg.queue.x-message-ttl=3600000}
Error:
Failed to bind properties under 'camel.component.rabbitmq.args' to java.util.Map<java.lang.String, java.lang.Object>:
Reason: No converter found capable of converting from type [java.lang.String] to type [java.util.Map<java.lang.String, java.lang.Object>]
How is the correct way by example? Thanks!!!
Solution
In the application.properties
, the proper syntax for a component option of type Map
is componentOptionName[mapKey]=mapValue
so in your case it would be:
camel.component.rabbitmq.args[queue.x-message-ttl]=3600000
Answered By - Nicolas Filotto
Answer Checked By - Gilberto Lyons (JavaFixing Admin)