Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-17664

username and password parameters not working on camel-amqp component

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Major
    • None
    • None
    • Camel
    • None
    • False
    • False
    • % %
    • Todo
    • Workaround Exists
    • Hide

      Set authentication properties directly on connection factory bean

      Show
      Set authentication properties directly on connection factory bean
    • Hide

      1. Configure a simple spring-boot camel-amqp consumer without setting username or password properties on the ConnectionFactory, but passing them in as URI parameters:

          <bean id="source.activemqConnectionFactory" class="org.apache.qpid.jms.JmsConnectionFactory">
              <constructor-arg value="${jmsSource}"/>
          </bean>
      
      jmsSource=amqp://localhost:5672?username=admin&password=admin
      

      2. Run the application against an available broker with a matching user / password and observe that authentication errors occur.

      3. Change the connection factory definition to include the username and password arguments:

          <bean id="source.activemqConnectionFactory" class="org.apache.qpid.jms.JmsConnectionFactory">
              <constructor-arg value="${jmsSourceUser}"/>
              <constructor-arg value="${jmsSourcePassword}"/>
              <constructor-arg value="${jmsSource}"/>
          </bean>
      

      4. Re-run the application and observe that the application successfully connects.

      Note: It also seemed like the spring properties were not picked up when set in the relevant application.properties:

      camel.component.amqp.username=admin
      camel.component.amqp.password=admin

      Show
      1. Configure a simple spring-boot camel-amqp consumer without setting username or password properties on the ConnectionFactory, but passing them in as URI parameters: <bean id= "source.activemqConnectionFactory" class= "org.apache.qpid.jms.JmsConnectionFactory" > <constructor-arg value= "${jmsSource}" /> </bean> jmsSource=amqp: //localhost:5672?username=admin&password=admin 2. Run the application against an available broker with a matching user / password and observe that authentication errors occur. 3. Change the connection factory definition to include the username and password arguments: <bean id= "source.activemqConnectionFactory" class= "org.apache.qpid.jms.JmsConnectionFactory" > <constructor-arg value= "${jmsSourceUser}" /> <constructor-arg value= "${jmsSourcePassword}" /> <constructor-arg value= "${jmsSource}" /> </bean> 4. Re-run the application and observe that the application successfully connects. Note: It also seemed like the spring properties were not picked up when set in the relevant application.properties: camel.component.amqp.username=admin camel.component.amqp.password=admin

    Description

      Camel AMQP Component documentation indicates username and password options can be set via URI parameters, but this does not seem to work in recent versions. It appears that only setting these parameters directly on the ConnectionFactory via property setters or constructor arguments has effect.

      Attachments

        Activity

          People

            Unassigned Unassigned
            rhn-support-dhawkins Duane Hawkins
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: