org.springframework.integration.support.channel.ChannelResolutionException: failed to look up MessageChannel bean with name 'org.springframework.integration.core.MessagingTemplate$TemporaryReplyChannel@409bad4f'

Spring JIRA | Oleg Zhurakousky | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    This is in-directly related to INT-2016. When AMQP reply message comes in its headers are converted into SI Message Headers Map<String, ?> headers = this.headerMapper.toHeaders(amqpReplyMessage.getMessageProperties()); Although those headers contain the original 'replyChannel' and 'errorChannel', the values are of type String (result of toString() on the MessageChannel) resulting in the ChannelResolutioinException {code} Exception in thread "executor-2" org.springframework.integration.support.channel.ChannelResolutionException: failed to look up MessageChannel bean with name 'org.springframework.integration.core.MessagingTemplate$TemporaryReplyChannel@409bad4f' at org.springframework.integration.support.channel.BeanFactoryChannelResolver.resolveChannelName(BeanFactoryChannelResolver.java:75) {code} As stated in INT-2016, those headers should not be part of AMQP message in the first place since they cary no value to the other side. Also, when reply comes in the gateway should copy the original 'replyChannel' and 'errorChannel' headers as we do in MessagingTemplate {code} reply = MessageBuilder.fromMessage(reply) .setHeader(MessageHeaders.REPLY_CHANNEL, originalReplyChannelHeader) .setHeader(MessageHeaders.ERROR_CHANNEL, originalErrorChannelHeader) .build(); {code}

    Spring JIRA | 6 years ago | Oleg Zhurakousky
    org.springframework.integration.support.channel.ChannelResolutionException: failed to look up MessageChannel bean with name 'org.springframework.integration.core.MessagingTemplate$TemporaryReplyChannel@409bad4f'

    Root Cause Analysis

    1. org.springframework.integration.support.channel.ChannelResolutionException

      failed to look up MessageChannel bean with name 'org.springframework.integration.core.MessagingTemplate$TemporaryReplyChannel@409bad4f'

      at org.springframework.integration.support.channel.BeanFactoryChannelResolver.resolveChannelName()
    2. Spring Integration Core
      BeanFactoryChannelResolver.resolveChannelName
      1. org.springframework.integration.support.channel.BeanFactoryChannelResolver.resolveChannelName(BeanFactoryChannelResolver.java:75)
      1 frame