You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Martin.Spamer" <Ma...@gmail.com> on 2014/04/14 17:47:55 UTC

Camel + Java DSL Fluent builder with real ActiveMQ Broker

I'm trying to implement a WireTap[1] with Java DSL Fluent Builders[2], which
gives the following example code snippet.

    from("direct:start")
    .to("log:foo")
    .wireTap("direct:tap")
    .to("mock:result");

This works if I run a mock example (e.g. camel-example-jms-file).  However
if I take the sample code and try to substitute a real Broker instance and
Queue to replace the mock objects it fails with error below. 

    from("tcp://localhost:61616")
    .to("ativemq:atsUpdateQueue")
    .wireTap("activemq:fdmCaptureQueue");

Then it fails

    org.apache.camel.FailedToCreateRouteException: Failed to create route
route2: Route(route2)[[From[tcp://localhost:61616?queue=atsUpdateQue...
because of Failed to resolve endpoint:
tcp://localhost:61616?queue=atsUpdateQueue due to: No component found with
scheme: tcp

I've googled extensively and all the example I've found use the virtual mock
queues none seem to illustrate working with a real broker and but I cannot
find any documentation on the URI specification for camel.

Can anybody give me any pointer to where I'm going wrong or to the uri
specification for the Java DSL EndPoints?

  [1]: https://camel.apache.org/wire-tap.html

  [2]: https://camel.apache.org/dsl.html





--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Java-DSL-Fluent-builder-with-real-ActiveMQ-Broker-tp5750209.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel + Java DSL Fluent builder with real ActiveMQ Broker

Posted by "kraythe ." <kr...@gmail.com>.
Sorry prematurely hit send. Try the endpoint I sent. You have to have the
:queue or :topic or the AMQ component cant find it. Also you will need to
make sure you have configured the connection factory for ActiveMQ.

*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
<http://www.linkedin.com/pub/robert-simmons/40/852/a39>*


On Mon, Apr 14, 2014 at 2:24 PM, kraythe . <kr...@gmail.com> wrote:

> activemq:queue:fdmCaptureQueue
>
> *Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
> *Author of: Hardcore Java (2003) and Maintainable Java (2012)*
> *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
> <http://www.linkedin.com/pub/robert-simmons/40/852/a39>*
>
>
> On Mon, Apr 14, 2014 at 10:47 AM, Martin.Spamer <Ma...@gmail.com>wrote:
>
>>
>> I'm trying to implement a WireTap[1] with Java DSL Fluent Builders[2],
>> which
>> gives the following example code snippet.
>>
>>     from("direct:start")
>>     .to("log:foo")
>>     .wireTap("direct:tap")
>>     .to("mock:result");
>>
>> This works if I run a mock example (e.g. camel-example-jms-file).  However
>> if I take the sample code and try to substitute a real Broker instance and
>> Queue to replace the mock objects it fails with error below.
>>
>>     from("tcp://localhost:61616")
>>     .to("ativemq:atsUpdateQueue")
>>     .wireTap("activemq:fdmCaptureQueue");
>>
>> Then it fails
>>
>>     org.apache.camel.FailedToCreateRouteException: Failed to create route
>> route2: Route(route2)[[From[tcp://localhost:61616?queue=atsUpdateQue...
>> because of Failed to resolve endpoint:
>> tcp://localhost:61616?queue=atsUpdateQueue due to: No component found with
>> scheme: tcp
>>
>> I've googled extensively and all the example I've found use the virtual
>> mock
>> queues none seem to illustrate working with a real broker and but I cannot
>> find any documentation on the URI specification for camel.
>>
>> Can anybody give me any pointer to where I'm going wrong or to the uri
>> specification for the Java DSL EndPoints?
>>
>>   [1]: https://camel.apache.org/wire-tap.html
>>
>>   [2]: https://camel.apache.org/dsl.html
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/Camel-Java-DSL-Fluent-builder-with-real-ActiveMQ-Broker-tp5750209.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>
>

Re: Camel + Java DSL Fluent builder with real ActiveMQ Broker

Posted by "kraythe ." <kr...@gmail.com>.
activemq:queue:fdmCaptureQueue

*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
<http://www.linkedin.com/pub/robert-simmons/40/852/a39>*


On Mon, Apr 14, 2014 at 10:47 AM, Martin.Spamer <Ma...@gmail.com>wrote:

>
> I'm trying to implement a WireTap[1] with Java DSL Fluent Builders[2],
> which
> gives the following example code snippet.
>
>     from("direct:start")
>     .to("log:foo")
>     .wireTap("direct:tap")
>     .to("mock:result");
>
> This works if I run a mock example (e.g. camel-example-jms-file).  However
> if I take the sample code and try to substitute a real Broker instance and
> Queue to replace the mock objects it fails with error below.
>
>     from("tcp://localhost:61616")
>     .to("ativemq:atsUpdateQueue")
>     .wireTap("activemq:fdmCaptureQueue");
>
> Then it fails
>
>     org.apache.camel.FailedToCreateRouteException: Failed to create route
> route2: Route(route2)[[From[tcp://localhost:61616?queue=atsUpdateQue...
> because of Failed to resolve endpoint:
> tcp://localhost:61616?queue=atsUpdateQueue due to: No component found with
> scheme: tcp
>
> I've googled extensively and all the example I've found use the virtual
> mock
> queues none seem to illustrate working with a real broker and but I cannot
> find any documentation on the URI specification for camel.
>
> Can anybody give me any pointer to where I'm going wrong or to the uri
> specification for the Java DSL EndPoints?
>
>   [1]: https://camel.apache.org/wire-tap.html
>
>   [2]: https://camel.apache.org/dsl.html
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-Java-DSL-Fluent-builder-with-real-ActiveMQ-Broker-tp5750209.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>