I'm implementing an MQ producer which will send messages via an OUT Queue. I have the channel, bridge, outbound bean, and the JMS outbound-channel-adapter setup. When I run my test case by sending the message, I see this error-> bad message cause=org.springframework.integration.MessageDispatchingException: Dispatcher has no subscribersbad message cause=null
Message config.xml
<?xml version="1.0" encoing="utf-8"?>
<beans
<int:channel id="inbound.rawjms">
<int: interceptors>
<int ref bean="jmsTransportHeaderEnricher"/>
</int: interceptors>
</int:channel>
<int:bridge input-channel="inbound.rawjms" output-channel="inbound.endpoint"/>
<channel id="inbound.endpoint">
<dispatcher task-executor="preDatabaseChannelExecutor"/>
</channel>
<bridge input-channel="inbound.endpoint" output-channel="inbound.endpoint.xml"/>
<channel id="inbound.endpoint.xml" datatype="java.lang.String"/>
<chain input-channel="inbound.endpoint.xml" output-channel="inbound.xml.database">
</chain>
<channel id="inbound.xml.database">
<dispatcher task-executor="postDatabaseChannelExecutor"/>
</channel>
<bean id="jms.queue" class="com.ibm.mq.jms.MQQueue">
<constructir-arg index="0" value="${txbus.mq.destination.outbound.queue}"/>
</bean>
<channel id="outbound.f.queue" datatype="java.lang.String"/>
<int-jms:outbound-channel-adapter
id="jms.outbound.adapter.queue"
channel="outbound.f.queue"
connection-factory="connectionFactory"
destination="jms.queue"
auto-startup="true"/>
</beans>
Config Class
@Configuration
@ImportResource("classpath:/META-INF/spring/message-config.xml")
public class Config{
@Bean
public Queue focusIn(@Value("${txbus.mq.destination}") String destinationIn){
return new MQQueue(destinationIn);
}
}
NOTE: I have removed the xmlns, xmlns:xsi, xsi:schema location
from the .xml
file as I couldn't copy them over.
Copyright License:
Author:「Santosh Ravi Teja」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/73171307/messagedispatchingexception-dispatcher-has-no-subscribers-bad-message-cause-n