0

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 Answers1

0

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) {
    ...
}
Gary Russell
  • 166,535
  • 14
  • 146
  • 179
  • Do you understand Spring Integration? It depends on what you want to do with the message. Typically, you will have a `@ServiceActivator` POJO method to handle the message. – Gary Russell Aug 22 '18 at 16:36
  • I added an example to my answer; see [the reference manual](https://docs.spring.io/spring-integration/reference/html/). – Gary Russell Aug 22 '18 at 19:05