0

I am using Spring DSL of Apache Camel in our project which is a Spring Boot application. We are connecting to various MQs like Apache Active MQ, Active MQ Artemis, IBM MQ in our project to send and receive message. We are able to successfully connect to Apache Active MQ and Active MQ Artemis using the below configuration file:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
          http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
          http://www.springframework.org/schema/context
          http://www.springframework.org/schema/context/spring-context-4.2.xsd">

    <bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
        <property name="environment">
            <props>
                <prop key="java.naming.factory.initial">org.wildfly.naming.client.WildFlyInitialContextFactory</prop>
                <prop key="java.naming.provider.url">${provider.url}</prop>
                <prop key="java.naming.security.principal">${security.principal}</prop>
                <prop key="java.naming.security.credentials">${security.credentials}</prop>
            </props>
        </property>
    </bean>

    <bean id="jmsQueueConnectionFactoryT24" class="org.springframework.jndi.JndiObjectFactoryBean" primary="true">
        <property name="jndiTemplate">
            <ref bean="jndiTemplate" />
        </property>
        <property name="jndiName">
            <value>${connectionFactory}</value>
        </property>
    </bean>

    <bean name="jmsT24" class="org.apache.camel.component.jms.JmsComponent">
        <property name="connectionFactory" ref="jmsQueueConnectionFactory" />
        <property name="concurrentConsumers" value="${jboss.jms.concurrentConsumers}" />
    </bean>
</beans>

I am now trying to figure out how to connect to IBM MQ and what all parameters to pass to create the connection factory like how to pass queue manager and channel information but unable to do so as it is not working, can anyone please provide what would be the InitialContextFactory and how to pass parameters for creating connection factory?

Anirban
  • 925
  • 4
  • 24
  • 54
  • Have you tried searching those two tags here? https://stackoverflow.com/questions/tagged/spring-boot+ibm-mq – JoshMc Oct 14 '20 at 18:11
  • 1
    Is [source](https://github.com/grovedc/CamelSpringJMS/blob/testing/boot-mq-bridge/src/main/resources/spring/camel-context.xml) helpful? – Doug Grove Oct 14 '20 at 18:35
  • Hi Josh - I have tried searching but got no useful result. – Anirban Oct 14 '20 at 19:09
  • Hi Doug - The Github link contains the information I was looking for. Will try to connect using this method and get back if there are any errors. Thanks a lot. – Anirban Oct 14 '20 at 19:11

0 Answers0