Camel
  1. Camel
  2. CAMEL-6545

seda producer - Add option to fail for non existing queue

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.12.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Novice

      Description

      See
      http://stackoverflow.com/questions/17457231/in-apache-camel-how-can-i-receive-an-error-if-an-endpoint-doesnt-exist

      It would be nice if we can configure a seda producer endpoint to fail if sending to a queue with no consumers at runtime, when the producer tries to send to the queue.

      .to("seda:foo?failIfNoConsumers=true")

      Maybe the name should be failIfNoConsumers ?

      For example the direct component has an exception DirectConsumerNotAvailableException. So we would need a SedaConsumerNotAvailableException for this component.

        Activity

        Hide
        Christian Posta added a comment -

        I've run into situations like this also.
        I can take a look at adding this

        Show
        Christian Posta added a comment - I've run into situations like this also. I can take a look at adding this
        Hide
        Christian Posta added a comment -

        Claus, can you give me feedback on this when you get a chance?

        Show
        Christian Posta added a comment - Claus, can you give me feedback on this when you get a chance?
        Hide
        Willem Jiang added a comment -

        Applied the patch into master branch with thanks to christina.
        I also fix some unit test failures of camel-vm component.

        Show
        Willem Jiang added a comment - Applied the patch into master branch with thanks to christina. I also fix some unit test failures of camel-vm component.
        Hide
        Claus Ibsen added a comment -

        Thanks for the contribution.

        Though there is a few spots to fix, as eg we should not log a WARN and then throw an exception, eg the WARN should be removed.

        Also mind that when we change something in seda then camel-hazelcast, camel-routebox and the new disruptor may be affected as they is related to seda / reuse it etc. So a good idea is to check if they work as expected still or something needs to be changed there also.

        Show
        Claus Ibsen added a comment - Thanks for the contribution. Though there is a few spots to fix, as eg we should not log a WARN and then throw an exception, eg the WARN should be removed. Also mind that when we change something in seda then camel-hazelcast, camel-routebox and the new disruptor may be affected as they is related to seda / reuse it etc. So a good idea is to check if they work as expected still or something needs to be changed there also.
        Hide
        Christian Posta added a comment -

        Thanks Claus and Willem.
        These are good comments, and I will keep in mind for future contributions.

        Show
        Christian Posta added a comment - Thanks Claus and Willem. These are good comments, and I will keep in mind for future contributions.

          People

          • Assignee:
            Willem Jiang
            Reporter:
            Claus Ibsen
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development