Apache camel how to implement an optional consumer for a wire tap





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















I set up some routes (Camel 2.22.1) that uses wire tap to log some stuff into a Mongo db.



from(DIRECT_NEXT).process(sendFile)
.wireTap( "direct:count-fetch?failIfNoConsumers=false" )


as you see i am using failIfNoConsumers=false.



from(COUNT_FETCH)
.routeId( MONGO_COUNT_FETCH_ROUTEID )
.autoStartup( false )
.process(countFetchProcessor)
.to(persistenceEndpoints.updateImage())
.log(LoggingLevel.DEBUG, "Counted fetch.");


The mongo DB is an optional component, the whole application will run without it.



I am using Mongo'S ServerMonitorListener to check if Mongo is available. I suspend or resume the rout using Camel's ControlBus accordingly.



All is running fine!
My Problem is that Camel tries to send the exchanges to the not running routes for 30s:



...
[DEBUG] 2019-01-03 14:02:45.848 [Camel (camel-1) thread #23 - WireTap] DirectBlockingProducer - Waited 20025 for consumer to be ready
...


Why the producer blocks? The default value for "block" should be false?!
And after it we see of course an exception:



 No consumers available on endpoint: direct://count-fetch?failIfNoConsumers=false


What is the best approach to let camel discard the exchange immediately (how to set the time out?) and don't throw any exception (because it is normal application behavior, exception will only slow down)?



UPDATE:
here is the complete exception:



[ERROR] 2019-01-07 10:21:22.702 [Camel (camel-1) thread #4 - WireTap] DefaultErrorHandler - Failed delivery for (MessageId: ID-moritz-1546852848013-0-3 on ExchangeId: ID-moritz-1546852848013-0-2). Exhausted after delivery attempt: 1 caught: org.apache.camel.component.direct.DirectConsumerNotAvailableException: No consumers available on endpoint: direct://update-all?failIfNoConsumers=false. Exchange[ID-moritz-1546852848013-0-2]

Message History
---------------------------------------------------------------------------------------------------------------------------------------
RouteId ProcessorId Processor Elapsed (ms)
[route4 ] [route4 ] [timer://updateAll ] [ 30065]
[route4 ] [log1 ] [log ] [ 1]
[route4 ] [to3 ] [direct:updateAll ] [ 19]
[route5 ] [process2 ] [Processor@0x4e92466a ] [ 9]
[route5 ] [process3 ] [Processor@0x1b29d52b ] [ 7]
[route5 ] [wireTap1 ] [wireTap[direct:update-all?failIfNoConsumers=false] ] [ 1]

Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
org.apache.camel.component.direct.DirectConsumerNotAvailableException: No consumers available on endpoint: direct://update-all?failIfNoConsumers=false. Exchange[ID-moritz-1546852848013-0-2]
at org.apache.camel.component.direct.DirectBlockingProducer.getConsumer(DirectBlockingProducer.java:67) ~[camel-core-2.22.1.jar:2.22.1]
at org.apache.camel.component.direct.DirectBlockingProducer.process(DirectBlockingProducer.java:53) ~[camel-core-2.22.1.jar:2.22.1]
at org.apache.camel.processor.SendDynamicProcessor$1.doInAsyncProducer(SendDynamicProcessor.java:178) ~[camel-core-2.22.1.jar:2.22.1]
at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:445) ~[camel-core-2.22.1.jar:2.22.1]
at org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:160) ~[camel-core-2.22.1.jar:2.22.1]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) [camel-core-2.22.1.jar:2.22.1]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.22.1.jar:2.22.1]
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97) [camel-core-2.22.1.jar:2.22.1]
at org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:160) [camel-core-2.22.1.jar:2.22.1]
at org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:155) [camel-core-2.22.1.jar:2.22.1]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]









share|improve this question































    0















    I set up some routes (Camel 2.22.1) that uses wire tap to log some stuff into a Mongo db.



    from(DIRECT_NEXT).process(sendFile)
    .wireTap( "direct:count-fetch?failIfNoConsumers=false" )


    as you see i am using failIfNoConsumers=false.



    from(COUNT_FETCH)
    .routeId( MONGO_COUNT_FETCH_ROUTEID )
    .autoStartup( false )
    .process(countFetchProcessor)
    .to(persistenceEndpoints.updateImage())
    .log(LoggingLevel.DEBUG, "Counted fetch.");


    The mongo DB is an optional component, the whole application will run without it.



    I am using Mongo'S ServerMonitorListener to check if Mongo is available. I suspend or resume the rout using Camel's ControlBus accordingly.



    All is running fine!
    My Problem is that Camel tries to send the exchanges to the not running routes for 30s:



    ...
    [DEBUG] 2019-01-03 14:02:45.848 [Camel (camel-1) thread #23 - WireTap] DirectBlockingProducer - Waited 20025 for consumer to be ready
    ...


    Why the producer blocks? The default value for "block" should be false?!
    And after it we see of course an exception:



     No consumers available on endpoint: direct://count-fetch?failIfNoConsumers=false


    What is the best approach to let camel discard the exchange immediately (how to set the time out?) and don't throw any exception (because it is normal application behavior, exception will only slow down)?



    UPDATE:
    here is the complete exception:



    [ERROR] 2019-01-07 10:21:22.702 [Camel (camel-1) thread #4 - WireTap] DefaultErrorHandler - Failed delivery for (MessageId: ID-moritz-1546852848013-0-3 on ExchangeId: ID-moritz-1546852848013-0-2). Exhausted after delivery attempt: 1 caught: org.apache.camel.component.direct.DirectConsumerNotAvailableException: No consumers available on endpoint: direct://update-all?failIfNoConsumers=false. Exchange[ID-moritz-1546852848013-0-2]

    Message History
    ---------------------------------------------------------------------------------------------------------------------------------------
    RouteId ProcessorId Processor Elapsed (ms)
    [route4 ] [route4 ] [timer://updateAll ] [ 30065]
    [route4 ] [log1 ] [log ] [ 1]
    [route4 ] [to3 ] [direct:updateAll ] [ 19]
    [route5 ] [process2 ] [Processor@0x4e92466a ] [ 9]
    [route5 ] [process3 ] [Processor@0x1b29d52b ] [ 7]
    [route5 ] [wireTap1 ] [wireTap[direct:update-all?failIfNoConsumers=false] ] [ 1]

    Stacktrace
    ---------------------------------------------------------------------------------------------------------------------------------------
    org.apache.camel.component.direct.DirectConsumerNotAvailableException: No consumers available on endpoint: direct://update-all?failIfNoConsumers=false. Exchange[ID-moritz-1546852848013-0-2]
    at org.apache.camel.component.direct.DirectBlockingProducer.getConsumer(DirectBlockingProducer.java:67) ~[camel-core-2.22.1.jar:2.22.1]
    at org.apache.camel.component.direct.DirectBlockingProducer.process(DirectBlockingProducer.java:53) ~[camel-core-2.22.1.jar:2.22.1]
    at org.apache.camel.processor.SendDynamicProcessor$1.doInAsyncProducer(SendDynamicProcessor.java:178) ~[camel-core-2.22.1.jar:2.22.1]
    at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:445) ~[camel-core-2.22.1.jar:2.22.1]
    at org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:160) ~[camel-core-2.22.1.jar:2.22.1]
    at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) [camel-core-2.22.1.jar:2.22.1]
    at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.22.1.jar:2.22.1]
    at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97) [camel-core-2.22.1.jar:2.22.1]
    at org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:160) [camel-core-2.22.1.jar:2.22.1]
    at org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:155) [camel-core-2.22.1.jar:2.22.1]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]









    share|improve this question



























      0












      0








      0








      I set up some routes (Camel 2.22.1) that uses wire tap to log some stuff into a Mongo db.



      from(DIRECT_NEXT).process(sendFile)
      .wireTap( "direct:count-fetch?failIfNoConsumers=false" )


      as you see i am using failIfNoConsumers=false.



      from(COUNT_FETCH)
      .routeId( MONGO_COUNT_FETCH_ROUTEID )
      .autoStartup( false )
      .process(countFetchProcessor)
      .to(persistenceEndpoints.updateImage())
      .log(LoggingLevel.DEBUG, "Counted fetch.");


      The mongo DB is an optional component, the whole application will run without it.



      I am using Mongo'S ServerMonitorListener to check if Mongo is available. I suspend or resume the rout using Camel's ControlBus accordingly.



      All is running fine!
      My Problem is that Camel tries to send the exchanges to the not running routes for 30s:



      ...
      [DEBUG] 2019-01-03 14:02:45.848 [Camel (camel-1) thread #23 - WireTap] DirectBlockingProducer - Waited 20025 for consumer to be ready
      ...


      Why the producer blocks? The default value for "block" should be false?!
      And after it we see of course an exception:



       No consumers available on endpoint: direct://count-fetch?failIfNoConsumers=false


      What is the best approach to let camel discard the exchange immediately (how to set the time out?) and don't throw any exception (because it is normal application behavior, exception will only slow down)?



      UPDATE:
      here is the complete exception:



      [ERROR] 2019-01-07 10:21:22.702 [Camel (camel-1) thread #4 - WireTap] DefaultErrorHandler - Failed delivery for (MessageId: ID-moritz-1546852848013-0-3 on ExchangeId: ID-moritz-1546852848013-0-2). Exhausted after delivery attempt: 1 caught: org.apache.camel.component.direct.DirectConsumerNotAvailableException: No consumers available on endpoint: direct://update-all?failIfNoConsumers=false. Exchange[ID-moritz-1546852848013-0-2]

      Message History
      ---------------------------------------------------------------------------------------------------------------------------------------
      RouteId ProcessorId Processor Elapsed (ms)
      [route4 ] [route4 ] [timer://updateAll ] [ 30065]
      [route4 ] [log1 ] [log ] [ 1]
      [route4 ] [to3 ] [direct:updateAll ] [ 19]
      [route5 ] [process2 ] [Processor@0x4e92466a ] [ 9]
      [route5 ] [process3 ] [Processor@0x1b29d52b ] [ 7]
      [route5 ] [wireTap1 ] [wireTap[direct:update-all?failIfNoConsumers=false] ] [ 1]

      Stacktrace
      ---------------------------------------------------------------------------------------------------------------------------------------
      org.apache.camel.component.direct.DirectConsumerNotAvailableException: No consumers available on endpoint: direct://update-all?failIfNoConsumers=false. Exchange[ID-moritz-1546852848013-0-2]
      at org.apache.camel.component.direct.DirectBlockingProducer.getConsumer(DirectBlockingProducer.java:67) ~[camel-core-2.22.1.jar:2.22.1]
      at org.apache.camel.component.direct.DirectBlockingProducer.process(DirectBlockingProducer.java:53) ~[camel-core-2.22.1.jar:2.22.1]
      at org.apache.camel.processor.SendDynamicProcessor$1.doInAsyncProducer(SendDynamicProcessor.java:178) ~[camel-core-2.22.1.jar:2.22.1]
      at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:445) ~[camel-core-2.22.1.jar:2.22.1]
      at org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:160) ~[camel-core-2.22.1.jar:2.22.1]
      at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) [camel-core-2.22.1.jar:2.22.1]
      at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.22.1.jar:2.22.1]
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97) [camel-core-2.22.1.jar:2.22.1]
      at org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:160) [camel-core-2.22.1.jar:2.22.1]
      at org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:155) [camel-core-2.22.1.jar:2.22.1]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
      at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]









      share|improve this question
















      I set up some routes (Camel 2.22.1) that uses wire tap to log some stuff into a Mongo db.



      from(DIRECT_NEXT).process(sendFile)
      .wireTap( "direct:count-fetch?failIfNoConsumers=false" )


      as you see i am using failIfNoConsumers=false.



      from(COUNT_FETCH)
      .routeId( MONGO_COUNT_FETCH_ROUTEID )
      .autoStartup( false )
      .process(countFetchProcessor)
      .to(persistenceEndpoints.updateImage())
      .log(LoggingLevel.DEBUG, "Counted fetch.");


      The mongo DB is an optional component, the whole application will run without it.



      I am using Mongo'S ServerMonitorListener to check if Mongo is available. I suspend or resume the rout using Camel's ControlBus accordingly.



      All is running fine!
      My Problem is that Camel tries to send the exchanges to the not running routes for 30s:



      ...
      [DEBUG] 2019-01-03 14:02:45.848 [Camel (camel-1) thread #23 - WireTap] DirectBlockingProducer - Waited 20025 for consumer to be ready
      ...


      Why the producer blocks? The default value for "block" should be false?!
      And after it we see of course an exception:



       No consumers available on endpoint: direct://count-fetch?failIfNoConsumers=false


      What is the best approach to let camel discard the exchange immediately (how to set the time out?) and don't throw any exception (because it is normal application behavior, exception will only slow down)?



      UPDATE:
      here is the complete exception:



      [ERROR] 2019-01-07 10:21:22.702 [Camel (camel-1) thread #4 - WireTap] DefaultErrorHandler - Failed delivery for (MessageId: ID-moritz-1546852848013-0-3 on ExchangeId: ID-moritz-1546852848013-0-2). Exhausted after delivery attempt: 1 caught: org.apache.camel.component.direct.DirectConsumerNotAvailableException: No consumers available on endpoint: direct://update-all?failIfNoConsumers=false. Exchange[ID-moritz-1546852848013-0-2]

      Message History
      ---------------------------------------------------------------------------------------------------------------------------------------
      RouteId ProcessorId Processor Elapsed (ms)
      [route4 ] [route4 ] [timer://updateAll ] [ 30065]
      [route4 ] [log1 ] [log ] [ 1]
      [route4 ] [to3 ] [direct:updateAll ] [ 19]
      [route5 ] [process2 ] [Processor@0x4e92466a ] [ 9]
      [route5 ] [process3 ] [Processor@0x1b29d52b ] [ 7]
      [route5 ] [wireTap1 ] [wireTap[direct:update-all?failIfNoConsumers=false] ] [ 1]

      Stacktrace
      ---------------------------------------------------------------------------------------------------------------------------------------
      org.apache.camel.component.direct.DirectConsumerNotAvailableException: No consumers available on endpoint: direct://update-all?failIfNoConsumers=false. Exchange[ID-moritz-1546852848013-0-2]
      at org.apache.camel.component.direct.DirectBlockingProducer.getConsumer(DirectBlockingProducer.java:67) ~[camel-core-2.22.1.jar:2.22.1]
      at org.apache.camel.component.direct.DirectBlockingProducer.process(DirectBlockingProducer.java:53) ~[camel-core-2.22.1.jar:2.22.1]
      at org.apache.camel.processor.SendDynamicProcessor$1.doInAsyncProducer(SendDynamicProcessor.java:178) ~[camel-core-2.22.1.jar:2.22.1]
      at org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:445) ~[camel-core-2.22.1.jar:2.22.1]
      at org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:160) ~[camel-core-2.22.1.jar:2.22.1]
      at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) [camel-core-2.22.1.jar:2.22.1]
      at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [camel-core-2.22.1.jar:2.22.1]
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:97) [camel-core-2.22.1.jar:2.22.1]
      at org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:160) [camel-core-2.22.1.jar:2.22.1]
      at org.apache.camel.processor.WireTapProcessor$1.call(WireTapProcessor.java:155) [camel-core-2.22.1.jar:2.22.1]
      at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_181]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
      at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]






      apache-camel






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 7 at 9:24







      dermoritz

















      asked Jan 3 at 13:18









      dermoritzdermoritz

      5,0001161115




      5,0001161115
























          1 Answer
          1






          active

          oldest

          votes


















          1














          Make sure to check the document for the version of Camel you use, which is 2.22.x



          There you can see the block is default enabled: https://github.com/apache/camel/blob/camel-2.22.x/camel-core/src/main/docs/direct-component.adoc






          share|improve this answer
























          • thx @claus this explains also why there is no change by setting failIfNoConsumers=false (it is also set by default) - but why i am still seeing the exchange failed exception - because of missing consumer? (i want it to wait, but then i don't want an exception to be raised. )

            – dermoritz
            Jan 7 at 9:15













          • You can use seda endpoint and turn on discardIfNoConsumers

            – Claus Ibsen
            Jan 7 at 19:52











          • thanks for suggestion. is this a bug in direct endpoint? should i open a ticket?

            – dermoritz
            Jan 8 at 8:01











          • Yeah it smells like a bug, you are welcome to log a JIRA. It seems working on master branch, you can try also to upgrade to Camel 2.23.0

            – Claus Ibsen
            Jan 8 at 8:15











          • Also try with latest 2.22.x release, eg 2.22.2

            – Claus Ibsen
            Jan 8 at 8:34












          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54023107%2fapache-camel-how-to-implement-an-optional-consumer-for-a-wire-tap%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Make sure to check the document for the version of Camel you use, which is 2.22.x



          There you can see the block is default enabled: https://github.com/apache/camel/blob/camel-2.22.x/camel-core/src/main/docs/direct-component.adoc






          share|improve this answer
























          • thx @claus this explains also why there is no change by setting failIfNoConsumers=false (it is also set by default) - but why i am still seeing the exchange failed exception - because of missing consumer? (i want it to wait, but then i don't want an exception to be raised. )

            – dermoritz
            Jan 7 at 9:15













          • You can use seda endpoint and turn on discardIfNoConsumers

            – Claus Ibsen
            Jan 7 at 19:52











          • thanks for suggestion. is this a bug in direct endpoint? should i open a ticket?

            – dermoritz
            Jan 8 at 8:01











          • Yeah it smells like a bug, you are welcome to log a JIRA. It seems working on master branch, you can try also to upgrade to Camel 2.23.0

            – Claus Ibsen
            Jan 8 at 8:15











          • Also try with latest 2.22.x release, eg 2.22.2

            – Claus Ibsen
            Jan 8 at 8:34
















          1














          Make sure to check the document for the version of Camel you use, which is 2.22.x



          There you can see the block is default enabled: https://github.com/apache/camel/blob/camel-2.22.x/camel-core/src/main/docs/direct-component.adoc






          share|improve this answer
























          • thx @claus this explains also why there is no change by setting failIfNoConsumers=false (it is also set by default) - but why i am still seeing the exchange failed exception - because of missing consumer? (i want it to wait, but then i don't want an exception to be raised. )

            – dermoritz
            Jan 7 at 9:15













          • You can use seda endpoint and turn on discardIfNoConsumers

            – Claus Ibsen
            Jan 7 at 19:52











          • thanks for suggestion. is this a bug in direct endpoint? should i open a ticket?

            – dermoritz
            Jan 8 at 8:01











          • Yeah it smells like a bug, you are welcome to log a JIRA. It seems working on master branch, you can try also to upgrade to Camel 2.23.0

            – Claus Ibsen
            Jan 8 at 8:15











          • Also try with latest 2.22.x release, eg 2.22.2

            – Claus Ibsen
            Jan 8 at 8:34














          1












          1








          1







          Make sure to check the document for the version of Camel you use, which is 2.22.x



          There you can see the block is default enabled: https://github.com/apache/camel/blob/camel-2.22.x/camel-core/src/main/docs/direct-component.adoc






          share|improve this answer













          Make sure to check the document for the version of Camel you use, which is 2.22.x



          There you can see the block is default enabled: https://github.com/apache/camel/blob/camel-2.22.x/camel-core/src/main/docs/direct-component.adoc







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 5 at 7:34









          Claus IbsenClaus Ibsen

          46.7k73754




          46.7k73754













          • thx @claus this explains also why there is no change by setting failIfNoConsumers=false (it is also set by default) - but why i am still seeing the exchange failed exception - because of missing consumer? (i want it to wait, but then i don't want an exception to be raised. )

            – dermoritz
            Jan 7 at 9:15













          • You can use seda endpoint and turn on discardIfNoConsumers

            – Claus Ibsen
            Jan 7 at 19:52











          • thanks for suggestion. is this a bug in direct endpoint? should i open a ticket?

            – dermoritz
            Jan 8 at 8:01











          • Yeah it smells like a bug, you are welcome to log a JIRA. It seems working on master branch, you can try also to upgrade to Camel 2.23.0

            – Claus Ibsen
            Jan 8 at 8:15











          • Also try with latest 2.22.x release, eg 2.22.2

            – Claus Ibsen
            Jan 8 at 8:34



















          • thx @claus this explains also why there is no change by setting failIfNoConsumers=false (it is also set by default) - but why i am still seeing the exchange failed exception - because of missing consumer? (i want it to wait, but then i don't want an exception to be raised. )

            – dermoritz
            Jan 7 at 9:15













          • You can use seda endpoint and turn on discardIfNoConsumers

            – Claus Ibsen
            Jan 7 at 19:52











          • thanks for suggestion. is this a bug in direct endpoint? should i open a ticket?

            – dermoritz
            Jan 8 at 8:01











          • Yeah it smells like a bug, you are welcome to log a JIRA. It seems working on master branch, you can try also to upgrade to Camel 2.23.0

            – Claus Ibsen
            Jan 8 at 8:15











          • Also try with latest 2.22.x release, eg 2.22.2

            – Claus Ibsen
            Jan 8 at 8:34

















          thx @claus this explains also why there is no change by setting failIfNoConsumers=false (it is also set by default) - but why i am still seeing the exchange failed exception - because of missing consumer? (i want it to wait, but then i don't want an exception to be raised. )

          – dermoritz
          Jan 7 at 9:15







          thx @claus this explains also why there is no change by setting failIfNoConsumers=false (it is also set by default) - but why i am still seeing the exchange failed exception - because of missing consumer? (i want it to wait, but then i don't want an exception to be raised. )

          – dermoritz
          Jan 7 at 9:15















          You can use seda endpoint and turn on discardIfNoConsumers

          – Claus Ibsen
          Jan 7 at 19:52





          You can use seda endpoint and turn on discardIfNoConsumers

          – Claus Ibsen
          Jan 7 at 19:52













          thanks for suggestion. is this a bug in direct endpoint? should i open a ticket?

          – dermoritz
          Jan 8 at 8:01





          thanks for suggestion. is this a bug in direct endpoint? should i open a ticket?

          – dermoritz
          Jan 8 at 8:01













          Yeah it smells like a bug, you are welcome to log a JIRA. It seems working on master branch, you can try also to upgrade to Camel 2.23.0

          – Claus Ibsen
          Jan 8 at 8:15





          Yeah it smells like a bug, you are welcome to log a JIRA. It seems working on master branch, you can try also to upgrade to Camel 2.23.0

          – Claus Ibsen
          Jan 8 at 8:15













          Also try with latest 2.22.x release, eg 2.22.2

          – Claus Ibsen
          Jan 8 at 8:34





          Also try with latest 2.22.x release, eg 2.22.2

          – Claus Ibsen
          Jan 8 at 8:34




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54023107%2fapache-camel-how-to-implement-an-optional-consumer-for-a-wire-tap%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          MongoDB - Not Authorized To Execute Command

          Npm cannot find a required file even through it is in the searched directory

          in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith