[ https://issues.apache.org/jira/browse/CAMEL-14052?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16948477#comment-16948477 ]
Claus Ibsen commented on CAMEL-14052: ------------------------------------- As workaround you can do {code} @Bean public MqttConnectOptions myMqttConnectOptions(@Value("myUsername") String user, @Value("myPassword") String pw) { MqttConnectOptions mq = new MqttConnectOptions(); mq.setUserName(user); mq.setPassword(pw.toCharArray()); return mq; } {code} in the spring boot application class etc and in application.properties you can have the configuration myUsername=myuser myPassword=mysecret > camel-paho - Make it possible to configure userName, password from > application.properties > ----------------------------------------------------------------------------------------- > > Key: CAMEL-14052 > URL: https://issues.apache.org/jira/browse/CAMEL-14052 > Project: Camel > Issue Type: Improvement > Components: camel-paho > Affects Versions: 3.0.0.RC2 > Reporter: Claus Ibsen > Priority: Major > Fix For: 3.0.0 > > > When using spring boot then the connectorOptions is null, so when you do > camel.component.paho.brokerUrl=tcp://localhost:61617 > camel.component.paho.connectOptions.userName=admin > camel.component.paho.connectOptions.password=admin123. > It will fail -- This message was sent by Atlassian Jira (v8.3.4#803005)