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

New option to ignore missing consumers on direct endpoints

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.16.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Moderate

      Description

      Currently a DirectConsumerNotAvailableException or DirectVmConsumerNotAvailableException is thrown when a message is send via a direct endoint and no consumer has been set up for this endpoint.

      In a current scenario I want to use camel to loosely couple two components using direct endpoints that might be consumed by some bean. Especially there should be no dependency from the producing component to the consuming component. However, if there is a consumer, messages send from the producer must be consumed synchronously in the same thread to preserve the transaction context of the producer. That why I chose direct for the producer's endpoint.

      What is meant by "the messages might be consumed" is that the consuming component might not be deployed, when the consumer produces the first messages, or perhaps will never be deployed. I know there is the block option for the direct component but I don't want the producer to wait for the consumer as it might take some time (possibly forever) for the consumer to be available.

      I think this is a very common scenario for a messaging system and I was surprised not to find an easy out-of-the-box way to handle this with camel. That's why I think an additional option failIfNoConsumers (similar to the option for the seda component) for the direct and direct-vm component would be very handy.

        Attachments

          Activity

            People

            • Assignee:
              boday Ben O'Day
              Reporter:
              dpr Daniel (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: