0
votes

I am trying to use Spring integration to connect to JMS client , but i am getting :-

[WARN ] 2018-08-22 10:57:20.378 [DispatchThread: [com.ibm.mq.jmqi.remote.impl.RemoteSession[connectionId=414D514353414D5030303144202020206CF77A5B9E4A5E21]]] SimpleMessageListenerContainer - Execution of JMS message listener failed, and no ErrorHandler has been set. org.springframework.messaging.MessageDeliveryException: Dispatcher has no subscribers for channel 'app-name:local:9010.inputChannel'.; nested exception is org.springframework.integration.MessageDispatchingException: Dispatcher has no subscribers, failedMessage=GenericMessage

and below is my spring integration configuration class

Any idea why i am getting this exception .

Many thanks in advance

1

1 Answers

0
votes

The problem is exactly what the message says.

Dispatcher has no subscribers for channel 'app-name:local:9010.inputChannel'.

You have no subscriber on this bean

@Bean
public MessageChannel inputChannel() {
    return new DirectChannel();
}

EDIT

@ServiceActivator(inputChannel = "inputChannel")
public void handle(String in) {
    ...
}

or

@Transformer(inputChannel = "inputChannel", outputChannel = "transformed")
public String handle(String in) {
    retur in.toUpperCase();
}

@ServiceActivator(inputChannel = "transformed")
public void handle(String in) {
    ...
}