Results 1 to 2 of 2

Thread: How does the exchange-name-expression on an amqp outbound channel work ?

  1. #1
    Join Date
    Aug 2010
    Posts
    23

    Default How does the exchange-name-expression on an amqp outbound channel work ?

    I have my destination AMQP exchange name in the header, and I want to use the exchange-expression-name on an outbound channel adapter to dynamically send to different exchanges.


    Code:
    <int:channel id="amqpOutboundChannel"/>
    <int-amqp:outbound-channel-adapter channel="amqpOutboundChannel" exchange-name-expression="headers['out.workQ']" routing-key="simpleKey" mapped-request-headers="embed.*"/>

    But I get the exception below -

    Code:
    Caused by: org.springframework.integration.MessagingException: failed to resolve channel name 'ORDER.XCHG'
    	at org.springframework.integration.router.AbstractMappingMessageRouter.resolveChannelForName(AbstractMappingMessageRouter.java:168)
    	at org.springframework.integration.router.AbstractMappingMessageRouter.addChannelFromString(AbstractMappingMessageRouter.java:197)

    Any idea what I might be doing wrong ?

  2. #2
    Join Date
    Aug 2010
    Posts
    23

    Default This was a router issue

    I found out the problem was with an upstream component (router).

    Thanks.


    Quote Originally Posted by kunlenzo247 View Post
    I have my destination AMQP exchange name in the header, and I want to use the exchange-expression-name on an outbound channel adapter to dynamically send to different exchanges.


    Code:
    <int:channel id="amqpOutboundChannel"/>
    <int-amqp:outbound-channel-adapter channel="amqpOutboundChannel" exchange-name-expression="headers['out.workQ']" routing-key="simpleKey" mapped-request-headers="embed.*"/>

    But I get the exception below -

    Code:
    Caused by: org.springframework.integration.MessagingException: failed to resolve channel name 'ORDER.XCHG'
    	at org.springframework.integration.router.AbstractMappingMessageRouter.resolveChannelForName(AbstractMappingMessageRouter.java:168)
    	at org.springframework.integration.router.AbstractMappingMessageRouter.addChannelFromString(AbstractMappingMessageRouter.java:197)

    Any idea what I might be doing wrong ?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •