/ / वसंत एकीकरण: MQSeries संदेश संचालित एडाप्टर काम नहीं कर रहा है - वसंत, वसंत-एकीकरण, संदेश-कतार, ibm-mq, spring-jms

वसंत एकीकरण: एमक्यूएसरीज़ संदेश संचालित एडाप्टर काम नहीं कर रहा है - वसंत, वसंत-एकीकरण, संदेश-कतार, ibm-mq, spring-jms

मैं सक्रिय एमक्यू (बाध्य संदेश संचालित चैनल में) और कफका (आउटबाउंड चैनल के रूप में) को सफलतापूर्वक एकीकृत करने में सक्षम हूं। यह ठीक काम कर रहा है।

अब, चूंकि ActiveMQ और MQ श्रृंखला दोनों JMS अनुरूप हैं, मैंने सोचा कि संक्रमण आसान होगा। लेकिन, यह नीचे त्रुटि फेंक रहा है:

Setup of JMS Message listener invoker failed for destination "queue://abcd" - trying to recover - Cause: JMSQ1112: The operation for a domain specific object was not valid. The operation "createConsumer" is not valid for type "com.ibm.mq.jms.MQQueue"

मेरा वसंत एकीकरण कॉन्फ़िगर नीचे जैसा दिखता है:

<?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:jms="http://www.springframework.org/schema/integration/jms"
xmlns:integration="http://www.springframework.org/schema/integration"
xmlns:int-kafka="http://www.springframework.org/schema/integration/kafka"
xmlns:task="http://www.springframework.org/schema/task"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/integration/jms
http://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd
http://www.springframework.org/schema/integration/kafka
http://www.springframework.org/schema/integration/kafka/spring-integration-kafka.xsd">

<jms:message-driven-channel-adapter id="requestChannelAdapter" channel="requestChannel"
container="requestListenerContainer" error-channel=""/>


<int-kafka:outbound-channel-adapter
id="kafkaOutboundChannelAdapter" kafka-template="kafkaTemplate"
auto-startup="true" sync="true" channel="inputToKafka" topic="test">
</int-kafka:outbound-channel-adapter>
</beans>

और मेरा संबंधित कोड नीचे जैसा दिखता है:

public MQQueueConnectionFactory jmsConnectionfactory() {

MQQueueConnectionFactory jmsFactory = new MQQueueConnectionFactory();
jmsFactory.setHostName(hostname);
jmsFactory.setPort(1444);
jmsFactory.setQueueManager(//valid queue manager);
jmsFactory.setChannel(//valid channel name);
jmsFactory.setTransportType(1);
jmsFactory.setSSLCipherSuite(// valid suite);
return jmsFactory;
}

@Bean
public DefaultMessageListenerContainer requestListenerContainer() {

DefaultMessageListenerContainer container = new DefaultMessageListenerContainer();
container.setConnectionFactory(jmsConnectionfactory());
container.setSessionTransacted(true);
container.setDestination(helloJMSQueue());
return container;
}


@Bean
public Queue helloJMSQueue() {
return new MQQueue(HELLO_QUEUE);
}

मुझे यह त्रुटि क्यों मिल रही है? मैंने कुछ पोस्ट देखी हैं जो कि jbsTemplate w.r.t MQQueue में उपलब्ध नहीं हैं, लेकिन यह 2005 में दिनांकित था और मैंने देखा कि परिवर्तन जारी किया गया है।

उत्तर:

उत्तर № 1 के लिए 1

बस प्रयोग करें container.setDestinationName(HELLO_QUEUE) इसके बजाय और कंटेनर को इसे ठीक से हल करने दें Session.