Re: Time taken to read messages from queue

2016-07-20 Thread Antoine DESSAIGNE
Hello.

That's something that you may extract from your JMS queue itself.

That beeing said, if you have burst of data you can use the log component
to tell what's happening. For instance you can use

It will tell you in the log, the number of exchange processed during the
last 10 seconds. When it reaches zero then you have read everything.

Hope this helps

Antoine

2016-07-19 10:00 GMT+02:00 fxthomas :

> Hello,
>
> I want to know if there is a simple way in camel to measure the time taken
> by route to read all messages present in the queue. Example My queue get
> populated on some time intervals , so i want to know how time it took just
> for the JMS component to read from the queue and not the full time cycle of
> the exchange.
> MY route as below
>
>  shutdownRunningTask="CompleteCurrentTaskOnly"  id="ProcessQueue"
> autoStartup="true">
> 
> 
>  
> uri="bean:routeQueueBean?method=parseQueueMessage(${body},'databasebean')"/>
>   
> java.lang.Exception
>false
>
>   
>   completionTimeout="3000" completionSize="100" completeAllOnStop="false">
> 
> true
> 
>  uri="bean:routeQueueBean?method=processQueueMessage('databasebean')"/>
>  
>
>   
>
> I want only the time taken by the route to read the all the messages in the
> queue present at the time. Like a batch total time .
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Time-taken-to-read-messages-from-queue-tp5785225.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Unmarshal fixed lenght Binary data format using Bindy

2016-07-20 Thread Antoine DESSAIGNE
Hello.

I'm not sure to understand which format your data is encoded. Any
dataformat will read data from a binary format, you need to pick the one
that match your format.

If you have a fixed-length format with like "4 digit for the ID, then 12
character for the name, then..." you can use :
* http://camel.apache.org/bindy.html
* http://camel.apache.org/beanio.html
* http://camel.apache.org/flatpack-dataformat.html
* http://camel.apache.org/univocity-parsers-formats.html

You should pick the one that your the most comfortable with.

Antoine.

2016-07-19 10:56 GMT+02:00 kaustubhkane :

> Hi,
>
> I have a fixed length Binary data in Bit pack format.
>
> Can I use the Bindy DataFormat to unmarshal the binary data?
>
> I looked at the details of the Bindy DataFormat. It provides the ability
> where using the Annotations the user can map the data model to POJO.
>
> This way user has to only define the data model in form of Annotations and
> Bindy Data Format in Apache Camel will unmarshal the data from file into
> the
> Object form.
>
> Thus wanted to know if Bindy DataFormat can be used to unmarshal the binary
> data
>
> If not Bindy then which DataFormat can I use to unmarshal the binary data
> where I will only need to define the data model and Camel will unmarshal
> the
> data from file to Object.
>
> Regards,
> Kaustubh Kane
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Unmarshal-fixed-lenght-Binary-data-format-using-Bindy-tp5785226.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Overriding default properties in camel http4 component via blueprint

2016-07-20 Thread Antoine DESSAIGNE
Hello.

It looks like you can configure it with the URI options. I've tried with
2.16.2 which is quite close.



Antoine.

2016-07-19 12:02 GMT+02:00 Claus Ibsen :

> Some components allow to configure component level options, which you
> do the  style.
>
> 
>   
> 
>
> Which is standard blueprint / spring xml style.
>
> Then the Camel routes that use http4 (the id of the bean) is using
> that component. You can give the id any name you like instead of
> http4.
>
>
>
> On Mon, Jul 18, 2016 at 3:29 PM, Debraj Manna 
> wrote:
> > I want to change maxTotalConnections and connectionsPerRoute in camel
> > http4 component
> > via blueprint.
> >
> > Can some one please let me know is it possible to do this or I have to
> send
> > this as URI option?
> >
> > I am on camel 2.16.3
>
>
>
> --
> Claus Ibsen
> -
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>


Re: Time taken to read messages from queue

2016-07-20 Thread fxthomas
hello, 

I just want to mesaure how much camel JMS component take to read from queue,
I dont want the complete exchange time take. I think using a Bean I can
measure it which is the only clean option i see. 

Using grouplog of camel is an option, but I am not sure how many messages
are there in queue to set the counter for it.

Thanks.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Time-taken-to-read-messages-from-queue-tp5785225p5785265.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Convert message into two converters and dilliver them to one destination

2016-07-20 Thread redpower1989
Thanks for answer. Does anyone know if you can change the messageId when you
are using multicast? At the moment multicast copy the message and the new
two messages have the same message ID. If i have a idempotentConsumer before
a producer endpoint it will block my second message even if it has been
converted to something different. For example:



  
  


  



  
  

  
  



  
  
  
 

  




--
View this message in context: 
http://camel.465427.n5.nabble.com/Convert-message-into-two-converters-and-dilliver-them-to-one-destination-tp5785205p5785266.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: spring boot shutdown strategy

2016-07-20 Thread Claus Ibsen
What version of Camel do you use? You may need to upgrade.

On Tue, Jul 19, 2016 at 11:58 PM, Minh Tran  wrote:
> Hi
>
> In a spring DSL, I used to be able to set a shutdown timeout by creating a 
> ShutdownStrategy bean and setting the appropriate properties and it would 
> work.
>
> Now when I attempt the same thing in Spring Boot, the bean seems to be 
> ignored. Any suggestions on the proper way of setting the shutdown timeout in 
> Spring Boot?
>
> I see this page https://github.com/things8/zed/issues/83 
>   It refers to a property called 
> camel.context.shutdown-strategy.timeout but it seems to have no effect.
>
> Thanks in advance.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: spring boot shutdown strategy

2016-07-20 Thread Minh Tran
Hi

I’ve tried both 2.17.1 and 2.17.2 and it seems to have no effect. My unit tests 
always says 10seconds.

Starting to graceful shutdown 1 routes (timeout 10 seconds)


> On 20 Jul 2016, at 8:51 PM, Claus Ibsen  wrote:
> 
> What version of Camel do you use? You may need to upgrade.
> 
> On Tue, Jul 19, 2016 at 11:58 PM, Minh Tran  wrote:
>> Hi
>> 
>> In a spring DSL, I used to be able to set a shutdown timeout by creating a 
>> ShutdownStrategy bean and setting the appropriate properties and it would 
>> work.
>> 
>> Now when I attempt the same thing in Spring Boot, the bean seems to be 
>> ignored. Any suggestions on the proper way of setting the shutdown timeout 
>> in Spring Boot?
>> 
>> I see this page https://github.com/things8/zed/issues/83 
>>   It refers to a property called 
>> camel.context.shutdown-strategy.timeout but it seems to have no effect.
>> 
>> Thanks in advance.
> 
> 
> 
> -- 
> Claus Ibsen
> -
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2



Re: spring boot shutdown strategy

2016-07-20 Thread Claus Ibsen
The camel-test-kit uses a 10 sec override by default.
https://github.com/apache/camel/blob/master/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java#L433

On Wed, Jul 20, 2016 at 7:43 AM, Minh Tran  wrote:
> Hi
>
> I’ve tried both 2.17.1 and 2.17.2 and it seems to have no effect. My unit 
> tests always says 10seconds.
>
> Starting to graceful shutdown 1 routes (timeout 10 seconds)
>
>
>> On 20 Jul 2016, at 8:51 PM, Claus Ibsen  wrote:
>>
>> What version of Camel do you use? You may need to upgrade.
>>
>> On Tue, Jul 19, 2016 at 11:58 PM, Minh Tran  wrote:
>>> Hi
>>>
>>> In a spring DSL, I used to be able to set a shutdown timeout by creating a 
>>> ShutdownStrategy bean and setting the appropriate properties and it would 
>>> work.
>>>
>>> Now when I attempt the same thing in Spring Boot, the bean seems to be 
>>> ignored. Any suggestions on the proper way of setting the shutdown timeout 
>>> in Spring Boot?
>>>
>>> I see this page https://github.com/things8/zed/issues/83 
>>>   It refers to a property called 
>>> camel.context.shutdown-strategy.timeout but it seems to have no effect.
>>>
>>> Thanks in advance.
>>
>>
>>
>> --
>> Claus Ibsen
>> -
>> http://davsclaus.com @davsclaus
>> Camel in Action 2: https://www.manning.com/ibsen2
>



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: spring boot shutdown strategy

2016-07-20 Thread Minh Tran
I’m using the @CamelSpringBootJUnit4ClassRunner but I guess it is probably 
using the same 10s default too.

I just tried starting up the application and shutting it down and it’s still on 
the default 300s there

Starting to graceful shutdown 1 routes (timeout 300 seconds)

Pretty certain my bean is being created as I can set a breakpoint on it and the 
debugger will stop there. Here is what I have defined 

   @Bean
   public ShutdownStrategy shutdownStrategy() {
DefaultShutdownStrategy strategy = new 
DefaultShutdownStrategy();
strategy.setTimeout(30);
return strategy;
}

> On 20 Jul 2016, at 9:51 PM, Claus Ibsen  wrote:
> 
> The camel-test-kit uses a 10 sec override by default.
> https://github.com/apache/camel/blob/master/components/camel-test/src/main/java/org/apache/camel/test/junit4/CamelTestSupport.java#L433
> 
> On Wed, Jul 20, 2016 at 7:43 AM, Minh Tran  wrote:
>> Hi
>> 
>> I’ve tried both 2.17.1 and 2.17.2 and it seems to have no effect. My unit 
>> tests always says 10seconds.
>> 
>> Starting to graceful shutdown 1 routes (timeout 10 seconds)
>> 
>> 
>>> On 20 Jul 2016, at 8:51 PM, Claus Ibsen  wrote:
>>> 
>>> What version of Camel do you use? You may need to upgrade.
>>> 
>>> On Tue, Jul 19, 2016 at 11:58 PM, Minh Tran  
>>> wrote:
 Hi
 
 In a spring DSL, I used to be able to set a shutdown timeout by creating a 
 ShutdownStrategy bean and setting the appropriate properties and it would 
 work.
 
 Now when I attempt the same thing in Spring Boot, the bean seems to be 
 ignored. Any suggestions on the proper way of setting the shutdown timeout 
 in Spring Boot?
 
 I see this page https://github.com/things8/zed/issues/83 
   It refers to a property called 
 camel.context.shutdown-strategy.timeout but it seems to have no effect.
 
 Thanks in advance.
>>> 
>>> 
>>> 
>>> --
>>> Claus Ibsen
>>> -
>>> http://davsclaus.com @davsclaus
>>> Camel in Action 2: https://www.manning.com/ibsen2
>> 
> 
> 
> 
> -- 
> Claus Ibsen
> -
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2



how to poll a Spring Bean in a "from" in a route to get a List to process

2016-07-20 Thread Mark Nuttall
As part of a "From" in a route, I need to able to "poll" (either by time or
schedule) a spring bean (i.e. a Spring Service)  and get a List<> by
calling a bean's method,so that i can process each item in the list.  I've
looked at "bean" and "jpa" but i am not seeing this in "bean" and I am not
using JPA per se (i.e. the Service class might modify/enhance the list and
thus is not a pure query).

1. can this be done?
2. is there i a link to an example?


Mark


Re: how to poll a Spring Bean in a "from" in a route to get a List to process

2016-07-20 Thread Antoine DESSAIGNE
Hello Mark,

You can use a timer [1] to trigger the processing of the route, then call
the bean to retrieve the list of elements to process and finally process
your elements.

[1] http://camel.apache.org/timer.html


2016-07-20 14:29 GMT+02:00 Mark Nuttall :

> As part of a "From" in a route, I need to able to "poll" (either by time or
> schedule) a spring bean (i.e. a Spring Service)  and get a List<> by
> calling a bean's method,so that i can process each item in the list.  I've
> looked at "bean" and "jpa" but i am not seeing this in "bean" and I am not
> using JPA per se (i.e. the Service class might modify/enhance the list and
> thus is not a pure query).
>
> 1. can this be done?
> 2. is there i a link to an example?
>
>
> Mark
>


RE: camel sql joined query with parameters won't run on sql server

2016-07-20 Thread Karts
I have the same issue with sql server, but it seems to be related to alias +
named param rather than a joined query.

The following works fine:

.setHeader("ExternalRef", simple("1234"))
.to("sql:select event from events where id= :#ExternalRef")

But if I alias the table :

.setHeader("ExternalRef", simple("1234"))
.to("sql:select t.event from events t where t.id= :#ExternalRef")

I get an exception 
com.microsoft.sqlserver.jdbc.SQLServerException: The multi-part identifier
"t.id" could not be bound.

If I hard-code it works fine:
.to("sql:select t.event from events t where t.id= '1234' ")

This seems specific to sql server driver, it works when using the jTDS
driver.



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-sql-joined-query-with-parameters-won-t-run-on-sql-server-tp5784402p5785280.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: how to poll a Spring Bean in a "from" in a route to get a List to process

2016-07-20 Thread Mark Nuttall
Antoine. Thx. I might just not have been doing "bean" right.  Will give it
ago again.

On Wed, Jul 20, 2016 at 9:18 AM, Antoine DESSAIGNE <
antoine.dessai...@gmail.com> wrote:

> Hello Mark,
>
> You can use a timer [1] to trigger the processing of the route, then call
> the bean to retrieve the list of elements to process and finally process
> your elements.
>
> [1] http://camel.apache.org/timer.html
>
>
> 2016-07-20 14:29 GMT+02:00 Mark Nuttall :
>
> > As part of a "From" in a route, I need to able to "poll" (either by time
> or
> > schedule) a spring bean (i.e. a Spring Service)  and get a List<> by
> > calling a bean's method,so that i can process each item in the list.
> I've
> > looked at "bean" and "jpa" but i am not seeing this in "bean" and I am
> not
> > using JPA per se (i.e. the Service class might modify/enhance the list
> and
> > thus is not a pure query).
> >
> > 1. can this be done?
> > 2. is there i a link to an example?
> >
> >
> > Mark
> >
>


How can I configure Camel/ActiveMQ to receive from an external RabbitMQ producer?

2016-07-20 Thread Kammer, John - US
Friends and colleagues,

I have been tasked to implement a message route from an external RabbitMQ 
provider into our Camel-ActiveMQ message service. I am having some difficulties 
getting the rabbit part set up and working within Camel. I get the feeling I am 
close, which may just be an illusion - but I am currently stuck and would 
appreciate any insight more experienced Camel and Rabbit users could provide.

At the moment I am suffering a ConnectionException for a refused connection. 
It's unclear to me whether there are credentials that need to be passed 
somewhere and if so where they are supposed to be defined. In the JMS section 
we're using a truststore as you can see in the listings below. Is the same 
required for the rabbit and if so how/where is that to be configured?

FWIW: We are using camel v2.15.5  and camel-rabbitmq v2.15.6

Here's the error I am currently seeing:
2016-07-20 16:07:17,988 [Camel (camel-1) thread #3 - RabbitMQConsumer] INFO  
org.apache.camel.component.rabbitmq.RabbitMQConsumer - Connection failed, will 
retry in {}100ms
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at 
java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at 
java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at 
java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at 
com.rabbitmq.client.impl.FrameHandlerFactory.create(FrameHandlerFactory.java:32)
at 
com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:811)
at 
com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:767)
at 
com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:887)
at 
org.apache.camel.component.rabbitmq.RabbitMQEndpoint.connect(RabbitMQEndpoint.java:195)
at 
org.apache.camel.component.rabbitmq.RabbitMQConsumer.openConnection(RabbitMQConsumer.java:68)
at 
org.apache.camel.component.rabbitmq.RabbitMQConsumer.access$500(RabbitMQConsumer.java:36)
at 
org.apache.camel.component.rabbitmq.RabbitMQConsumer$StartConsumerCallable.call(RabbitMQConsumer.java:323)
at 
org.apache.camel.component.rabbitmq.RabbitMQConsumer$StartConsumerCallable.call(RabbitMQConsumer.java:304)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

And what  I think are the relevant parts of the configuration...









-->

   
   
   
   
...
























>From the logs...

...
2016-07-20 16:22:37,603 [main] DEBUG 
org.springframework.context.support.FileSystemXmlApplicationContext - Bean 
factory for 
org.springframework.context.support.FileSystemXmlApplicationContext@48524010: 
org.springframework.beans.factory.support.DefaultListableBeanFactory@73c60324: 
defining beans 
[org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,bridgePropertyPlaceholder,audit_log,producerTemplate,org.apache.camel.spring.CamelRedeliveryPolicyFactoryBean#0,defaultEH,consumerTemplate,camel-1:beanPostProcessor,camel-1,broadcastProcessor,fileWrapper,timeUtil,...,redeliveryPolicyConfig,localConnFactory,localPooledConnFactory,localConfig,localJms,rabbitmq];
 root of factory hierarchy
...
2016-07-20 16:22:37,756 [main] INFO  
org.springframework.beans.factory.support.DefaultListableBeanFactory - 
Pre-instantiating singletons in 
org.springframework.beans.factory.support.DefaultListableBeanFactory@73c60324: 
defining beans 
[org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,bridgePropertyPlaceholder,audit_log,producerTemplate,org.apache.camel.spring.CamelRedeliveryPolicyFactoryBean#0,defaultEH,consumerTemplate,camel-1:beanPostProcessor,camel-1,broadcastProcessor,fileWrapper,timeUtil,...,redeliveryPolicyConfig,localConnFactory,localPooledConnFactory,localConfig,localJms,rabbitmq,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwarePro

Re: How can I configure Camel/ActiveMQ to receive from an external RabbitMQ producer?

2016-07-20 Thread souciance
I didn't see anywhere that you connected with a username/password to
rabbitmq. The default user and password is guest/guest but could be that
they restrict it to another user. Also I guessing you want access to the
default vhost and not another defined one?

On Wed, Jul 20, 2016 at 7:41 PM, Kammer, John - US [via Camel] <
ml-node+s465427n5785283...@n5.nabble.com> wrote:

> Friends and colleagues,
>
> I have been tasked to implement a message route from an external RabbitMQ
> provider into our Camel-ActiveMQ message service. I am having some
> difficulties getting the rabbit part set up and working within Camel. I get
> the feeling I am close, which may just be an illusion - but I am currently
> stuck and would appreciate any insight more experienced Camel and Rabbit
> users could provide.
>
> At the moment I am suffering a ConnectionException for a refused
> connection. It's unclear to me whether there are credentials that need to
> be passed somewhere and if so where they are supposed to be defined. In the
> JMS section we're using a truststore as you can see in the listings below.
> Is the same required for the rabbit and if so how/where is that to be
> configured?
>
> FWIW: We are using camel v2.15.5  and camel-rabbitmq v2.15.6
>
> Here's the error I am currently seeing:
> 2016-07-20 16:07:17,988 [Camel (camel-1) thread #3 - RabbitMQConsumer]
> INFO  org.apache.camel.component.rabbitmq.RabbitMQConsumer - Connection
> failed, will retry in {}100ms
> java.net.ConnectException: Connection refused
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
>
> at
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
>
> at
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
> at java.net.Socket.connect(Socket.java:589)
> at
> com.rabbitmq.client.impl.FrameHandlerFactory.create(FrameHandlerFactory.java:32)
>
> at
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:811)
>
> at
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:767)
>
> at
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:887)
>
> at
> org.apache.camel.component.rabbitmq.RabbitMQEndpoint.connect(RabbitMQEndpoint.java:195)
>
> at
> org.apache.camel.component.rabbitmq.RabbitMQConsumer.openConnection(RabbitMQConsumer.java:68)
>
> at
> org.apache.camel.component.rabbitmq.RabbitMQConsumer.access$500(RabbitMQConsumer.java:36)
>
> at
> org.apache.camel.component.rabbitmq.RabbitMQConsumer$StartConsumerCallable.call(RabbitMQConsumer.java:323)
>
> at
> org.apache.camel.component.rabbitmq.RabbitMQConsumer$StartConsumerCallable.call(RabbitMQConsumer.java:304)
>
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>
> at java.lang.Thread.run(Thread.java:745)
>
> And what  I think are the relevant parts of the configuration...
>
>  earlier
> 
> 
> 
> 
> 
>  uri="rabbitmq://localhost:5672/rabbit?connectionFactory=#rabbitConnectionFactory"/>
>
> 
> 
> -->
>
>
>
>
>
> ...
> 
> 
>  class="org.apache.activemq.ActiveMQSslConnectionFactory">
> 
> 
> 
>  value="${local.truststore.password}" />
> 
>  class="org.apache.activemq.pool.PooledConnectionFactory"
> init-method="start" destroy-method="stop">
> 
> 
> 
> 
>  class="org.apache.camel.component.jms.JmsConfiguration">
> 
> 
> 
>  class="org.apache.activemq.camel.component.ActiveMQComponent">
> 
> 
>
>  class="org.apache.camel.component.rabbitmq.RabbitMQComponent">
> 
>
> From the logs...
>
> ...
> 2016-07-20 16:22:37,603 [main] DEBUG
> org.springframework.context.support.FileSystemXmlApplicationContext - Bean
> factory for
> org.springframework.context.support.FileSystemXmlApplicationContext@48524010:
> org.springframework.beans.factory.support.DefaultListableBeanFactory@73c60324:
> defining beans
> [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,bridgePropertyPlaceholder,audit_log,producerTemplate,org.apache.camel.spring.CamelRedeliveryPolicyFactoryBean#0,defaultEH,consumerTemplate,camel-1:beanPostProcessor,camel-1,broadcastProcessor,fileWrapper,timeUtil,...,redeliveryPolicyConfig,localConnFactory,localPooledConnFactory,localConfig,localJms,

Re: How can I configure Camel/ActiveMQ to receive from an external RabbitMQ producer?

2016-07-20 Thread Brad Johnson
I've not used RabbitMQ so can't give much insight there but wonder if you
have an independent way to verify the connection:

rabbitmq://localhost:5672/rabbit

Is there a rabbitmq equivalent of curl to connect?

On Wed, Jul 20, 2016 at 12:40 PM, Kammer, John - US 
wrote:

> Friends and colleagues,
>
> I have been tasked to implement a message route from an external RabbitMQ
> provider into our Camel-ActiveMQ message service. I am having some
> difficulties getting the rabbit part set up and working within Camel. I get
> the feeling I am close, which may just be an illusion - but I am currently
> stuck and would appreciate any insight more experienced Camel and Rabbit
> users could provide.
>
> At the moment I am suffering a ConnectionException for a refused
> connection. It's unclear to me whether there are credentials that need to
> be passed somewhere and if so where they are supposed to be defined. In the
> JMS section we're using a truststore as you can see in the listings below.
> Is the same required for the rabbit and if so how/where is that to be
> configured?
>
> FWIW: We are using camel v2.15.5  and camel-rabbitmq v2.15.6
>
> Here's the error I am currently seeing:
> 2016-07-20 16:07:17,988 [Camel (camel-1) thread #3 - RabbitMQConsumer]
> INFO  org.apache.camel.component.rabbitmq.RabbitMQConsumer - Connection
> failed, will retry in {}100ms
> java.net.ConnectException: Connection refused
> at java.net.PlainSocketImpl.socketConnect(Native Method)
> at
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
> at
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
> at
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
> at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
> at java.net.Socket.connect(Socket.java:589)
> at
> com.rabbitmq.client.impl.FrameHandlerFactory.create(FrameHandlerFactory.java:32)
> at
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:811)
> at
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:767)
> at
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:887)
> at
> org.apache.camel.component.rabbitmq.RabbitMQEndpoint.connect(RabbitMQEndpoint.java:195)
> at
> org.apache.camel.component.rabbitmq.RabbitMQConsumer.openConnection(RabbitMQConsumer.java:68)
> at
> org.apache.camel.component.rabbitmq.RabbitMQConsumer.access$500(RabbitMQConsumer.java:36)
> at
> org.apache.camel.component.rabbitmq.RabbitMQConsumer$StartConsumerCallable.call(RabbitMQConsumer.java:323)
> at
> org.apache.camel.component.rabbitmq.RabbitMQConsumer$StartConsumerCallable.call(RabbitMQConsumer.java:304)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
>
> And what  I think are the relevant parts of the configuration...
>
>  earlier
> 
> 
> 
> 
> 
>  uri="rabbitmq://localhost:5672/rabbit?connectionFactory=#rabbitConnectionFactory"/>
> 
> 
> -->
>
>
>
>
>
> ...
> 
> 
>  class="org.apache.activemq.ActiveMQSslConnectionFactory">
> 
> 
> 
>  value="${local.truststore.password}" />
> 
>  class="org.apache.activemq.pool.PooledConnectionFactory"
> init-method="start" destroy-method="stop">
> 
> 
> 
> 
>  class="org.apache.camel.component.jms.JmsConfiguration">
> 
> 
> 
>  class="org.apache.activemq.camel.component.ActiveMQComponent">
> 
> 
>
>  class="org.apache.camel.component.rabbitmq.RabbitMQComponent">
> 
>
> From the logs...
>
> ...
> 2016-07-20 16:22:37,603 [main] DEBUG
> org.springframework.context.support.FileSystemXmlApplicationContext - Bean
> factory for
> org.springframework.context.support.FileSystemXmlApplicationContext@48524010:
> org.springframework.beans.factory.support.DefaultListableBeanFactory@73c60324:
> defining beans
> [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,bridgePropertyPlaceholder,audit_log,producerTemplate,org.apache.camel.spring.CamelRedeliveryPolicyFactoryBean#0,defaultEH,consumerTemplate,camel-1:beanPostProcessor,camel-1,broadcastProcessor,fileWrapper,timeUtil,...,redeliveryPolicyConfig,localConnFactory,localPooledConnFactory,localConfig,localJms,rabbitmq];
> root of factory hierarchy
> ...
> 2016-07-20 16:22:37,756 [main] INFO
> org.springframework.beans.factory.support.Def

Re: How can I configure Camel/ActiveMQ to receive from an external RabbitMQ producer?

2016-07-20 Thread souciance
There is a rest API to connect and off course the RabbitMQ webgui is good
too.

On Wed, Jul 20, 2016 at 7:50 PM, Ranx [via Camel] <
ml-node+s465427n5785285...@n5.nabble.com> wrote:

> I've not used RabbitMQ so can't give much insight there but wonder if you
> have an independent way to verify the connection:
>
> rabbitmq://localhost:5672/rabbit
>
> Is there a rabbitmq equivalent of curl to connect?
>
> On Wed, Jul 20, 2016 at 12:40 PM, Kammer, John - US <[hidden email]
> >
> wrote:
>
> > Friends and colleagues,
> >
> > I have been tasked to implement a message route from an external
> RabbitMQ
> > provider into our Camel-ActiveMQ message service. I am having some
> > difficulties getting the rabbit part set up and working within Camel. I
> get
> > the feeling I am close, which may just be an illusion - but I am
> currently
> > stuck and would appreciate any insight more experienced Camel and Rabbit
> > users could provide.
> >
> > At the moment I am suffering a ConnectionException for a refused
> > connection. It's unclear to me whether there are credentials that need
> to
> > be passed somewhere and if so where they are supposed to be defined. In
> the
> > JMS section we're using a truststore as you can see in the listings
> below.
> > Is the same required for the rabbit and if so how/where is that to be
> > configured?
> >
> > FWIW: We are using camel v2.15.5  and camel-rabbitmq v2.15.6
> >
> > Here's the error I am currently seeing:
> > 2016-07-20 16:07:17,988 [Camel (camel-1) thread #3 - RabbitMQConsumer]
> > INFO  org.apache.camel.component.rabbitmq.RabbitMQConsumer - Connection
> > failed, will retry in {}100ms
> > java.net.ConnectException: Connection refused
> > at java.net.PlainSocketImpl.socketConnect(Native Method)
> > at
> >
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
>
> > at
> >
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
>
> > at
> >
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
> > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
> > at java.net.Socket.connect(Socket.java:589)
> > at
> >
> com.rabbitmq.client.impl.FrameHandlerFactory.create(FrameHandlerFactory.java:32)
>
> > at
> >
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:811)
>
> > at
> >
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:767)
>
> > at
> >
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:887)
>
> > at
> >
> org.apache.camel.component.rabbitmq.RabbitMQEndpoint.connect(RabbitMQEndpoint.java:195)
>
> > at
> >
> org.apache.camel.component.rabbitmq.RabbitMQConsumer.openConnection(RabbitMQConsumer.java:68)
>
> > at
> >
> org.apache.camel.component.rabbitmq.RabbitMQConsumer.access$500(RabbitMQConsumer.java:36)
>
> > at
> >
> org.apache.camel.component.rabbitmq.RabbitMQConsumer$StartConsumerCallable.call(RabbitMQConsumer.java:323)
>
> > at
> >
> org.apache.camel.component.rabbitmq.RabbitMQConsumer$StartConsumerCallable.call(RabbitMQConsumer.java:304)
>
> > at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>
> > at java.lang.Thread.run(Thread.java:745)
> >
> > And what  I think are the relevant parts of the configuration...
> >
> >  results
> > earlier
> > 
> > 
> > 
> > 
> > 
> >  >
> uri="rabbitmq://localhost:5672/rabbit?connectionFactory=#rabbitConnectionFactory"/>
>
> > 
> > 
> > -->
> >
> >
> >
> >
> >
> > ...
> > 
> > 
> >  > class="org.apache.activemq.ActiveMQSslConnectionFactory">
> > 
> > 
> > 
> >  > value="${local.truststore.password}" />
> > 
> >  > class="org.apache.activemq.pool.PooledConnectionFactory"
> > init-method="start" destroy-method="stop">
> > 
> > 
> > 
> > 
> >  > class="org.apache.camel.component.jms.JmsConfiguration">
> > 
> > 
> > 
> >  > class="org.apache.activemq.camel.component.ActiveMQComponent">
> > 
> > 
> >
> >  > class="org.apache.camel.component.rabbitmq.RabbitMQComponent">
> > 
> >
> > From the logs...
> >
> > ...
> > 2016-07-20 16:22:37,603 [main] DEBUG
> > org.springframework.context.support.FileSystemXmlApplicationContext -
> Bean
> > factory for
> >
> org.springframework.context.support.FileSystemXmlApplicationContext@48524010:
>
> >
> org.springframework.beans.factory.support.DefaultListableBeanFactory@73c60324:
>
> > defining beans
> >
> [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAn

Re: How can I configure Camel/ActiveMQ to receive from an external RabbitMQ producer?

2016-07-20 Thread Brad Johnson
John,

Can you use curl and verify the URI and credentials?

http://hg.rabbitmq.com/rabbitmq-management/raw-file/rabbitmq_v2_2_0/priv/www-api/help.html



On Wed, Jul 20, 2016 at 12:52 PM, souciance <
souciance.eqdam.ras...@gmail.com> wrote:

> There is a rest API to connect and off course the RabbitMQ webgui is good
> too.
>
> On Wed, Jul 20, 2016 at 7:50 PM, Ranx [via Camel] <
> ml-node+s465427n5785285...@n5.nabble.com> wrote:
>
> > I've not used RabbitMQ so can't give much insight there but wonder if you
> > have an independent way to verify the connection:
> >
> > rabbitmq://localhost:5672/rabbit
> >
> > Is there a rabbitmq equivalent of curl to connect?
> >
> > On Wed, Jul 20, 2016 at 12:40 PM, Kammer, John - US <[hidden email]
> > >
> > wrote:
> >
> > > Friends and colleagues,
> > >
> > > I have been tasked to implement a message route from an external
> > RabbitMQ
> > > provider into our Camel-ActiveMQ message service. I am having some
> > > difficulties getting the rabbit part set up and working within Camel. I
> > get
> > > the feeling I am close, which may just be an illusion - but I am
> > currently
> > > stuck and would appreciate any insight more experienced Camel and
> Rabbit
> > > users could provide.
> > >
> > > At the moment I am suffering a ConnectionException for a refused
> > > connection. It's unclear to me whether there are credentials that need
> > to
> > > be passed somewhere and if so where they are supposed to be defined. In
> > the
> > > JMS section we're using a truststore as you can see in the listings
> > below.
> > > Is the same required for the rabbit and if so how/where is that to be
> > > configured?
> > >
> > > FWIW: We are using camel v2.15.5  and camel-rabbitmq v2.15.6
> > >
> > > Here's the error I am currently seeing:
> > > 2016-07-20 16:07:17,988 [Camel (camel-1) thread #3 - RabbitMQConsumer]
> > > INFO  org.apache.camel.component.rabbitmq.RabbitMQConsumer - Connection
> > > failed, will retry in {}100ms
> > > java.net.ConnectException: Connection refused
> > > at java.net.PlainSocketImpl.socketConnect(Native Method)
> > > at
> > >
> >
> java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
> >
> > > at
> > >
> >
> java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
> >
> > > at
> > >
> >
> java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
> > > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
> > > at java.net.Socket.connect(Socket.java:589)
> > > at
> > >
> >
> com.rabbitmq.client.impl.FrameHandlerFactory.create(FrameHandlerFactory.java:32)
> >
> > > at
> > >
> >
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:811)
> >
> > > at
> > >
> >
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:767)
> >
> > > at
> > >
> >
> com.rabbitmq.client.ConnectionFactory.newConnection(ConnectionFactory.java:887)
> >
> > > at
> > >
> >
> org.apache.camel.component.rabbitmq.RabbitMQEndpoint.connect(RabbitMQEndpoint.java:195)
> >
> > > at
> > >
> >
> org.apache.camel.component.rabbitmq.RabbitMQConsumer.openConnection(RabbitMQConsumer.java:68)
> >
> > > at
> > >
> >
> org.apache.camel.component.rabbitmq.RabbitMQConsumer.access$500(RabbitMQConsumer.java:36)
> >
> > > at
> > >
> >
> org.apache.camel.component.rabbitmq.RabbitMQConsumer$StartConsumerCallable.call(RabbitMQConsumer.java:323)
> >
> > > at
> > >
> >
> org.apache.camel.component.rabbitmq.RabbitMQConsumer$StartConsumerCallable.call(RabbitMQConsumer.java:304)
> >
> > > at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> > > at
> > >
> >
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> >
> > > at
> > >
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> >
> > > at java.lang.Thread.run(Thread.java:745)
> > >
> > > And what  I think are the relevant parts of the configuration...
> > >
> > >  > results
> > > earlier
> > > 
> > > 
> > > 
> > > 
> > > 
> > >  > >
> >
> uri="rabbitmq://localhost:5672/rabbit?connectionFactory=#rabbitConnectionFactory"/>
> >
> > > 
> > > 
> > > -->
> > >
> > >
> > >
> > >
> > >
> > > ...
> > > 
> > > 
> > >  > > class="org.apache.activemq.ActiveMQSslConnectionFactory">
> > > 
> > > 
> > > 
> > >  > > value="${local.truststore.password}" />
> > > 
> > >  > > class="org.apache.activemq.pool.PooledConnectionFactory"
> > > init-method="start" destroy-method="stop">
> > > 
> > > 
> > > 
> > > 
> > >  > > class="org.apache.camel.component.jms.JmsConfiguration">
> > > 
> > > 
> > > 
> > >  > > class="org.apache.activemq.camel.component.ActiveMQComponent">
> > > 
> > > 
> > >
> > >  > > class="org.apache.camel.component.rabbitmq.RabbitMQComponent">
>

Re: Convert message into two converters and dilliver them to one destination

2016-07-20 Thread Quinn Stevenson
I’m not following your logic in this route - both of the sub-routes are using 
the same idempotent repository, so I think you’ll wind up marking items as 
duplicates when they really are not.

Did you mean to put the idempotent consumer on the from=source route?.

> On Jul 20, 2016, at 3:42 AM, redpower1989  wrote:
> 
> Thanks for answer. Does anyone know if you can change the messageId when you
> are using multicast? At the moment multicast copy the message and the new
> two messages have the same message ID. If i have a idempotentConsumer before
> a producer endpoint it will block my second message even if it has been
> converted to something different. For example:
> 
> 
> 
>  
>  
>
>
>  
> 
> 
> 
>  
>  
> 
>  
>  
> 
> 
> 
>  
>  
> 
>   
> 
>  
> 
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Convert-message-into-two-converters-and-dilliver-them-to-one-destination-tp5785205p5785266.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



Re: How can I configure Camel/ActiveMQ to receive from an external RabbitMQ producer?

2016-07-20 Thread jkam...@caci.com
souciance wrote
> I didn't see anywhere that you connected with a username/password to
> rabbitmq. The default user and password is guest/guest but could be that
> they restrict it to another user. Also I guessing you want access to the
> default vhost and not another defined one?

I have not yet even tried to send a message to the queue, I'm just trying to
start up camel without getting all these errors. I am not clear on what is
trying to connect with what and then generating the connection refused
error. 

My thought process (please correct if mistaken) is that on my existing
Camel/ActiveMQ side I will need to set up a queue to which the external
rabbitMQ message producer will be able to connect/write. So far that's all
the configuration I've put in place is intended to accomplish. When I start
Camel I immediately start getting the connection errors. If I need
username/password on this queue then I assume there are defaults? Or if not,
where would I configure these? 

Thanks for the input!



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-can-I-configure-Camel-ActiveMQ-to-receive-from-an-external-RabbitMQ-producer-tp5785283p5785289.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How can I configure Camel/ActiveMQ to receive from an external RabbitMQ producer?

2016-07-20 Thread souciance
Even if you don't send anything, the connection alone requires a
username/password and possibly a defined vhost unless you are allowed to
connect to the default one.

If I were you I would connect to the webgui first. It is usually
http://rabbtmq:15672 and see if you get a login page and can access it with
guest/guest and see what exchanges and queues are visible to you.

On Wed, Jul 20, 2016 at 8:44 PM, jkam...@caci.com [via Camel] <
ml-node+s465427n5785289...@n5.nabble.com> wrote:

> souciance wrote
> I didn't see anywhere that you connected with a username/password to
> rabbitmq. The default user and password is guest/guest but could be that
> they restrict it to another user. Also I guessing you want access to the
> default vhost and not another defined one?
>
> I have not yet even tried to send a message to the queue, I'm just trying
> to start up camel without getting all these errors. I am not clear on what
> is trying to connect with what and then generating the connection refused
> error.
>
> My thought process (please correct if mistaken) is that on my existing
> Camel/ActiveMQ side I will need to set up a queue to which the external
> rabbitMQ message producer will be able to connect/write. So far that's all
> the configuration I've put in place is intended to accomplish. When I start
> Camel I immediately start getting the connection errors. If I need
> username/password on this queue then I assume there are defaults? Or if
> not, where would I configure these?
>
> Thanks for the input!
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/How-can-I-configure-Camel-ActiveMQ-to-receive-from-an-external-RabbitMQ-producer-tp5785283p5785289.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/How-can-I-configure-Camel-ActiveMQ-to-receive-from-an-external-RabbitMQ-producer-tp5785283p5785292.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How can I configure Camel/ActiveMQ to receive from an external RabbitMQ producer?

2016-07-20 Thread owain
The suggestion is to satisfy yourself that you are able to access the
RabbitMQ from a command line or web gui from outside Camel to check that you
do have it running, have the correct port, username and password. Then once
you are satisfied it is available then use the same parameters on the
endpoint URI.

So really it is a step back outside of Camel for a quick test before you get
the route working.

Good luck.]]O.



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-can-I-configure-Camel-ActiveMQ-to-receive-from-an-external-RabbitMQ-producer-tp5785283p5785293.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How can I configure Camel/ActiveMQ to receive from an external RabbitMQ producer?

2016-07-20 Thread jkam...@caci.com
souciance wrote
> There is a rest API to connect and off course the RabbitMQ webgui is good
> too.
> 
> On Wed, Jul 20, 2016 at 7:50 PM, Ranx [via Camel] <

> ml-node+s465427n5785285h98@.nabble

>> wrote:
> 
>> I've not used RabbitMQ so can't give much insight there but wonder if you
>> have an independent way to verify the connection:
>>
>> rabbitmq://localhost:5672/rabbit
>>
>> Is there a rabbitmq equivalent of curl to connect?

I'm not running the rabbit-server on the camel/activeMQ box so I'm not sure
this will help just yet. I am trying to get a queue set up on the
camel/activemq server to which the external rabbitmq producer will
/eventually /be able to communicate.  It's when I fire up the Camel process
that I start seeing these errors in the logs. No messages are even being
sent yet. 



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-can-I-configure-Camel-ActiveMQ-to-receive-from-an-external-RabbitMQ-producer-tp5785283p5785294.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How can I configure Camel/ActiveMQ to receive from an external RabbitMQ producer?

2016-07-20 Thread souciance
Aha, but once you start the rabbitmq endpoint on Camel it will try to
connect to whichever hostname you defined. If that hostname is not yet
available you will get connect refused. Camel will try to connect on
startup, if you don't want this, then disable the rabbit stuff until you
have the rabbit server running.

What I mean is, you have the code:

  

This will try to connect to rabbit on localhost on startup (when the route
starts). So either disable the route as not to start or replace it with a
"direct" uri for now until you get rabbit running.

On Wed, Jul 20, 2016 at 9:16 PM, jkam...@caci.com [via Camel] <
ml-node+s465427n5785294...@n5.nabble.com> wrote:

> souciance wrote
> There is a rest API to connect and off course the RabbitMQ webgui is good
> too.
>
> On Wed, Jul 20, 2016 at 7:50 PM, Ranx [via Camel] <
> [hidden email] >
> wrote:
>
> > I've not used RabbitMQ so can't give much insight there but wonder if
> you
> > have an independent way to verify the connection:
> >
> > rabbitmq://localhost:5672/rabbit
> >
> > Is there a rabbitmq equivalent of curl to connect?
>
> I'm not running the rabbit-server on the camel/activeMQ box so I'm not
> sure this will help just yet. I am trying to get a queue set up on the
> camel/activemq server to which the external rabbitmq producer will *eventually
> *be able to communicate.  It's when I fire up the Camel process that I
> start seeing these errors in the logs. No messages are even being sent yet.
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/How-can-I-configure-Camel-ActiveMQ-to-receive-from-an-external-RabbitMQ-producer-tp5785283p5785294.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/How-can-I-configure-Camel-ActiveMQ-to-receive-from-an-external-RabbitMQ-producer-tp5785283p5785295.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How can I configure Camel/ActiveMQ to receive from an external RabbitMQ producer?

2016-07-20 Thread jkam...@caci.com
souciance wrote
> Even if you don't send anything, the connection alone requires a
> username/password and possibly a defined vhost unless you are allowed to
> connect to the default one.
> 
> If I were you I would connect to the webgui first. It is usually
> http://rabbtmq:15672 and see if you get a login page and can access it
> with
> guest/guest and see what exchanges and queues are visible to you.

No joy trying to connect to http://rabbtmq:15672. It does not seem to be
there. 
:-(




--
View this message in context: 
http://camel.465427.n5.nabble.com/How-can-I-configure-Camel-ActiveMQ-to-receive-from-an-external-RabbitMQ-producer-tp5785283p5785296.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How can I configure Camel/ActiveMQ to receive from an external RabbitMQ producer?

2016-07-20 Thread souciance
Ok my bad, I meant http://:15672 and substitute the
hostname for the real one.

On Wed, Jul 20, 2016 at 9:38 PM, jkam...@caci.com [via Camel] <
ml-node+s465427n5785296...@n5.nabble.com> wrote:

> souciance wrote
> Even if you don't send anything, the connection alone requires a
> username/password and possibly a defined vhost unless you are allowed to
> connect to the default one.
>
> If I were you I would connect to the webgui first. It is usually
> http://rabbtmq:15672 and see if you get a login page and can access it
> with
> guest/guest and see what exchanges and queues are visible to you.
>
> No joy trying to connect to http://rabbtmq:15672. It does not seem to be
> there.
> :-(
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/How-can-I-configure-Camel-ActiveMQ-to-receive-from-an-external-RabbitMQ-producer-tp5785283p5785296.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/How-can-I-configure-Camel-ActiveMQ-to-receive-from-an-external-RabbitMQ-producer-tp5785283p5785297.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How can I configure Camel/ActiveMQ to receive from an external RabbitMQ producer?

2016-07-20 Thread jkam...@caci.com
souciance wrote
> Aha, but once you start the rabbitmq endpoint on Camel it will try to
> connect to whichever hostname you defined. If that hostname is not yet
> available you will get connect refused. Camel will try to connect on
> startup, if you don't want this, then disable the rabbit stuff until you
> have the rabbit server running.
> 
> What I mean is, you have the code:
> 
>   
> 
> This will try to connect to rabbit on localhost on startup (when the route
> starts). So either disable the route as not to start or replace it with a
> "direct" uri for now until you get rabbit running.

Ok, a bit confused by this no doubt from lack of experience with Camel.
Thanks for your time/assistance. So this is what I would like to do and
please tell me whether this is possible or not (and if so, how to go about
it would be great too):

On the camel server I want to set up a route(endpoint?) into which some
external system using rabbitMQ can post messages. I will have zero control
over when or if the external system decides to send anything, I just need a
way to receive its messages when/if they decide to send them. So when I
start my camel server I would like it to come up and be ready to receive
these messages - again with no guarantee as to when or if I will get
anything. 

For testing purposes I have a laptop on the network set up with RabbitMQ so
I can eventually use it to send messages to the Camel server. But the
question is how to get the camel server set up in the first place?

Thanks again!




--
View this message in context: 
http://camel.465427.n5.nabble.com/How-can-I-configure-Camel-ActiveMQ-to-receive-from-an-external-RabbitMQ-producer-tp5785283p5785298.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How can I configure Camel/ActiveMQ to receive from an external RabbitMQ producer?

2016-07-20 Thread jkam...@caci.com
souciance wrote
> Ok my bad, I meant http://
> 
> :15672 and substitute the
> hostname for the real one.

Noted. I'd tried that along with any variation I could think of with the
same results. 



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-can-I-configure-Camel-ActiveMQ-to-receive-from-an-external-RabbitMQ-producer-tp5785283p5785299.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How can I configure Camel/ActiveMQ to receive from an external RabbitMQ producer?

2016-07-20 Thread jkam...@caci.com
souciance wrote
> Ok my bad, I meant http://
> 
> :15672 and substitute the
> hostname for the real one.

I am assuming here that the  is referring to the server
running camel along with the camel-rabbit component AND NOT the server
running rabbitmq. 



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-can-I-configure-Camel-ActiveMQ-to-receive-from-an-external-RabbitMQ-producer-tp5785283p5785300.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How can I configure Camel/ActiveMQ to receive from an external RabbitMQ producer?

2016-07-20 Thread souciance
Well no..

your code says:



Camel does not have an embedded rabbitmq server. It will always try to
connect to  rabbitmq server and then act as a consumer or publisher.

The hostname is the hostname of the rabbitmq server.

If you cannot reach it, then is the URL correct? Have you enabled the webui
plugin? See
http://www.thegeekstuff.com/2013/10/enable-rabbitmq-management-plugin/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+TheGeekStuff+(The+Geek+Stuff)

So in summary:
1. Camel does not have an embedded rabbitmq server. You need one yourself.
2. The from("rabbitmq...") means Camel wants to connect RabbitMQ and
consume from some exchange. These options need to be available to the user
which Camel is using to connect with.

On Wed, Jul 20, 2016 at 9:51 PM, jkam...@caci.com [via Camel] <
ml-node+s465427n5785300...@n5.nabble.com> wrote:

> souciance wrote
> Ok my bad, I meant http://:15672 and substitute the
> hostname for the real one.
>
> I am assuming here that the  is referring to the server
> running camel along with the camel-rabbit component AND NOT the server
> running rabbitmq.
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/How-can-I-configure-Camel-ActiveMQ-to-receive-from-an-external-RabbitMQ-producer-tp5785283p5785300.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/How-can-I-configure-Camel-ActiveMQ-to-receive-from-an-external-RabbitMQ-producer-tp5785283p5785301.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to concurrently shutdown routes

2016-07-20 Thread Martin Lichtin
One problem with writing a custom shutdown strategy is that in
DefaultCamelContext,
the "stopRoute" and "shutdownRoute" methods are synchronized.

Or how else could I circumvent this 'serialization'?


Claus Ibsen-2 wrote
> Hi
> 
> No the default shutdown is as-is. You would need to build your custom
> shutdown, and that can be a bit more complex if some routes have inter
> related dependencies, so you cannot shutdown X before Y etc.
> 
> On Thu, Jul 14, 2016 at 12:01 PM, Martin Lichtin
> <

> lichtin@.com

> > wrote:
>> Is there a way to shutdown some routes in a context concurrently?
>> The default shutdown strategy seems to handle one route after the other.
>> To speed things up, I'm looking for a way to shutdown a set of routes at
>> once.
> 
> 
> 
> -- 
> Claus Ibsen
> -
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2





--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-concurrently-shutdown-routes-tp5785106p5785302.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How can I configure Camel/ActiveMQ to receive from an external RabbitMQ producer?

2016-07-20 Thread jkam...@caci.com
souciance wrote
> Well no..
> 
> your code says:
> 
> Camel does not have an embedded rabbitmq server. It will always try to
> connect to  rabbitmq server and then act as a consumer or publisher.
> 
> The hostname is the hostname of the rabbitmq server.
> 
> If you cannot reach it, then is the URL correct? Have you enabled the
> webui
> plugin? See
> http://www.thegeekstuff.com/2013/10/enable-rabbitmq-management-plugin/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+TheGeekStuff+(The+Geek+Stuff)
> 
> So in summary:
> 1. Camel does not have an embedded rabbitmq server. You need one yourself.
> 2. The from("rabbitmq...") means Camel wants to connect RabbitMQ and
> consume from some exchange. These options need to be available to the user
> which Camel is using to connect with.

AH,... now that is helpful. I had been told that Camel could "talk" to
rabbit by including the camel-rabbitmq..jar and that this would not
require a separate rabbitMQ-server to be up and running. From what you are
telling me this seems not to be the case and that I will actually need a
rabbitMQ-server running on the Camel server (or networked accordingly) in
order to knit this all together. 

If that is in fact the case I will need to go back to the drawing board as
the folks that want me to receive rabbit messages also do not want me to set
up a rabbit server. 

Fun times. 




--
View this message in context: 
http://camel.465427.n5.nabble.com/How-can-I-configure-Camel-ActiveMQ-to-receive-from-an-external-RabbitMQ-producer-tp5785283p5785303.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How can I configure Camel/ActiveMQ to receive from an external RabbitMQ producer?

2016-07-20 Thread souciance
Hmm, not quit sure why they thought Camel does not require a separate
rabbitmq server. The camel-rabbitmq component is a way for Camel to speak
to RabbitMQ. It implements the rabbitmq client API.

On Wed, Jul 20, 2016 at 10:05 PM, jkam...@caci.com [via Camel] <
ml-node+s465427n5785303...@n5.nabble.com> wrote:

> souciance wrote
> Well no..
>
> your code says:
>
> 
>
> Camel does not have an embedded rabbitmq server. It will always try to
> connect to  rabbitmq server and then act as a consumer or publisher.
>
> The hostname is the hostname of the rabbitmq server.
>
> If you cannot reach it, then is the URL correct? Have you enabled the
> webui
> plugin? See
>
> http://www.thegeekstuff.com/2013/10/enable-rabbitmq-management-plugin/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+TheGeekStuff+(The+Geek+Stuff)
>
>
> So in summary:
> 1. Camel does not have an embedded rabbitmq server. You need one yourself.
> 2. The from("rabbitmq...") means Camel wants to connect RabbitMQ and
> consume from some exchange. These options need to be available to the user
> which Camel is using to connect with.
>
> AH,... now that is helpful. I had been told that Camel could "talk" to
> rabbit by including the camel-rabbitmq..jar and that this would
> not require a separate rabbitMQ-server to be up and running. From what you
> are telling me this seems not to be the case and that I will actually need
> a rabbitMQ-server running on the Camel server (or networked accordingly) in
> order to knit this all together.
>
> If that is in fact the case I will need to go back to the drawing board as
> the folks that want me to receive rabbit messages also do not want me to
> set up a rabbit server.
>
> Fun times.
>
>
> --
> If you reply to this email, your message will be added to the discussion
> below:
>
> http://camel.465427.n5.nabble.com/How-can-I-configure-Camel-ActiveMQ-to-receive-from-an-external-RabbitMQ-producer-tp5785283p5785303.html
> To start a new topic under Camel - Users, email
> ml-node+s465427n465428...@n5.nabble.com
> To unsubscribe from Camel - Users, click here
> 
> .
> NAML
> 
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/How-can-I-configure-Camel-ActiveMQ-to-receive-from-an-external-RabbitMQ-producer-tp5785283p5785304.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Sample Projects in Camel

2016-07-20 Thread Bharath Kumar Champalal
Hello all,

I was thinking to have sample projects in camel.
Something in the same as find in spring boot.

Not sure how to start, can anyone guide.
Currently I'm free so I thought I could learn Camel and would help community 
too.

Regards,
Bharath.




http://www.mindtree.com/email/disclaimer.html


Re: Sample Projects in Camel

2016-07-20 Thread Minh Tran
Hi,

I found the Camel In Action book to be very helpful. You can get the first 
chapter free https://www.manning.com/books/camel-in-action 


> On 21 Jul 2016, at 2:31 PM, Bharath Kumar Champalal 
>  wrote:
> 
> Hello all,
> 
> I was thinking to have sample projects in camel.
> Something in the same as find in spring boot.
> 
> Not sure how to start, can anyone guide.
> Currently I'm free so I thought I could learn Camel and would help community 
> too.
> 
> Regards,
> Bharath.
> 
> 
> 
> 
> http://www.mindtree.com/email/disclaimer.html