You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by alx <am...@ptc.com> on 2014/06/05 14:07:34 UTC

distributed file copy

Hi,
I am new to Camel.
I was wondering if it is possible to deploy Camel so that I have one
ActiveMQ instance on server A and two Camel instances on servers B and C.

I read about the file component which can write the body of a message to a
local file: I would like instead to have a file component running on server
C that consumes a message from a queue and writes the message body to a
local file (local to server C). The reason is that I have an application
running on server C that can only be integrated by providing files to its
local folder structure.

Is this distributed approach the best way forward? If so, how do I deploy
it? If not, what do you advise?

Thanks!
Alex



--
View this message in context: http://camel.465427.n5.nabble.com/distributed-file-copy-tp5751920.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: distributed file copy

Posted by "Walzer, Thomas" <th...@integratix.net>.
Alex,

You can run Camel in a gazillion ways (see http://java.dzone.com/articles/apache-camel-deployment-modes).
You can run it as a standalone java app. You can also embed it somewhere (even in an ActiveMQ server if I remember right).

If you go with option 1, you could use servicemix or fabric8. Servicemix comes as a nice complete bundle with Camel+AMQ+CXF+whatnot, that is tested to work together. 
Fabric8 should be the same.
Don´t know if that is too much of overhead for your use case.
And referencing a remote broker is fine. The less moving parts - the less maintenance (nightmare).

Cheers, Thomas.

Am 05.06.2014 um 16:05 schrieb alx <am...@ptc.com>:

> Thomas,
> yes, you got my problem right.
> So my first option, in case I need to send files as messages (files are
> usually XML files, but could be graphics as well), would be to embed Camel
> in a Java app running on server C with a local route to read from the queue
> and write to a local file, referencing the ActiveMQ on server A. Tried that:
> it works.
> Second option would be create a share on server C, open the related port,
> and copy files from remote.
> 
> As far as option 1 I was stuck with running an activemq instance within
> camel, but this is not required at all, and referencing a remote broker is
> just as easy.
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/distributed-file-copy-tp5751920p5751929.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: distributed file copy

Posted by alx <am...@ptc.com>.
Thomas,
yes, you got my problem right.
So my first option, in case I need to send files as messages (files are
usually XML files, but could be graphics as well), would be to embed Camel
in a Java app running on server C with a local route to read from the queue
and write to a local file, referencing the ActiveMQ on server A. Tried that:
it works.
Second option would be create a share on server C, open the related port,
and copy files from remote.

As far as option 1 I was stuck with running an activemq instance within
camel, but this is not required at all, and referencing a remote broker is
just as easy.



--
View this message in context: http://camel.465427.n5.nabble.com/distributed-file-copy-tp5751920p5751929.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: distributed file copy

Posted by "Walzer, Thomas" <th...@integratix.net>.
Hi Alex,

Not sure if I get your problem right:
If you can not access server C remotely (NFS, SMB, FTP, …) you will have to run Camel locally on server C.
You can connect to ActiveMQ on server A and consume from there and produce to a local file on C.
I am not sure if it is a great idea to send files via a queue (however I have seen this in production)...
If you could access C remotely you could deploy your camel routes to ActiveMQ directly, not needing a separate Camel instance.

Cheers, Thomas.

Am 05.06.2014 um 14:07 schrieb alx <am...@ptc.com>:

> Hi,
> I am new to Camel.
> I was wondering if it is possible to deploy Camel so that I have one
> ActiveMQ instance on server A and two Camel instances on servers B and C.
> 
> I read about the file component which can write the body of a message to a
> local file: I would like instead to have a file component running on server
> C that consumes a message from a queue and writes the message body to a
> local file (local to server C). The reason is that I have an application
> running on server C that can only be integrated by providing files to its
> local folder structure.
> 
> Is this distributed approach the best way forward? If so, how do I deploy
> it? If not, what do you advise?
> 
> Thanks!
> Alex
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/distributed-file-copy-tp5751920.html
> Sent from the Camel - Users mailing list archive at Nabble.com.