Uploaded image for project: 'Spring XD'
  1. Spring XD
  2. XD-1707

The Dynamic Router example in the docs throws an exception with Rabbit Transport

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Critical
    • Resolution: Complete
    • Affects Version/s: M6
    • Fix Version/s: M7
    • Component/s: Runtime
    • Labels:
    • Story Points:
      1
    • Rank (Obsolete):
      44073
    • Sprint:
      Sprint 27

      Description

      The example in the M6 documentation for the Dynamic Router (here: http://docs.spring.io/spring-xd/docs/1.0.0.M6/reference/html/#dynamic-router) for the SpEL-Based Routing throws an exception when processing the message (from the HTTP post) saying "No bean named 'queue:foo' is defined", when using RabbitMQ as the transport. I do not know a workaround.

      Steps to reproduce:
      1) Run RabbitMQ locally
      2) Run xd-singlenode --transport rabbit
      3) xd:>stream create f --definition "queue:foo > transform --expression=payload+'-foo' | log" --deploy

      xd:>stream create b --definition "queue:bar > transform --expression=payload+'-bar' | log" --deploy

      xd:>stream create r --definition "http | router --expression=payload.contains('a')?'queue:foo':'queue:bar'" --deploy

      4) xd:>http post --data "a"

      5) This should give a stacktrace:
      Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'queue:foo' is defined
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:641)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1159)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:282)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:273)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:273)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
      at org.springframework.integration.support.channel.BeanFactoryChannelResolver.resolveDestination(BeanFactoryChannelResolver.java:99)
      ... 83 more

        Attachments

          Activity

            People

            Assignee:
            grussell Gary Russell
            Reporter:
            dbeauregard Derek Beauregard
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: