Announcement Announcement Module
Collapse
No announcement yet.
How does the exchange-name-expression on an amqp outbound channel work ? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    This was a router issue

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

    Thanks.


    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 ?

    Comment

    Working...
    X