Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-5510

Competing Consumers fails for jms queue using AdviceWith

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.9.2
    • 2.11.2, 2.12.1, 2.13.0
    • camel-test
    • None
    • Windows7 x64 Juno Eclipse

    • Unknown

    Description

      I was trying to test two routes that start from the same endpoint. The endpoint is a jms queue, so it should be able to have multiple consumers attach to it. When I use the standard CamelTestSupport methodology and let it create and start my context, mock my out points, etc. everything passes (see CompetingConsumersWorks.java). However when I try and use the strategy of not letting the junit support create everything, ie.
      public boolean isUseRouteBuilder()

      { return false; }


      public boolean isUseAdviceWith()

      { return true; }


      and try and use AdviceWithRouteBuilder to mock out routes the test doesn't pass (see CompetingConsumersDoesNotWork.java). I can actually get it to work, but only if I start the context before adding the second set of routes to the context (see comments in code).

      Attachments

        1. CompetingConsumersWorks.java
          0.7 kB
          William McDonald
        2. CompetingConsumersDoesNotWork.java
          3 kB
          William McDonald
        3. CompetingConsumersBase.java
          3 kB
          William McDonald

        Activity

          People

            davsclaus Claus Ibsen
            wjmcdonald William McDonald
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: