You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Bruno Borges <br...@gmail.com> on 2009/03/11 21:18:05 UTC

Multicast from File Polling

What is the best option to do a multicasting from a file polling endpoint?



Bruno Borges
blog.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
- Francois de La Rochefoucauld
Sent from: Rio de janeiro Rj Brazil.

Re: Multicast from File Polling

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Mar 12, 2009 at 1:43 PM, Bruno Borges <br...@gmail.com> wrote:
> By the way, is it possible to fork camel-test to 1.6.x ? That would be
> great. =D
>
> The code doesn't seem to be complicated to accomplish this.
No but to adding a new .jar to the articfacts to be asembled and build
with maven does take a bit of pain to get right.
There are multiple files and you gotta remember it all etc.

If you provide a patch that would help, and we could consider adding
it in 1.6.x.

Camel 1.6.x is to be a patch fix only now so end users on 1.6 have a
stable branch for producation usage.


>
> Bruno Borges
> blog.brunoborges.com.br
> +55 21 76727099
>
> "The glory of great men should always be
> measured by the means they have used to
> acquire it."
> - Francois de La Rochefoucauld
>
>
> On Thu, Mar 12, 2009 at 9:28 AM, Claus Ibsen <cl...@gmail.com> wrote:
>
>> On Thu, Mar 12, 2009 at 1:25 PM, Bruno Borges <br...@gmail.com>
>> wrote:
>> > That's what I've been doing (with 1.6). Looks like I'm already doing the
>> > only possible way. :-)
>> >
>> > Thanks!
>> >
>> > PS: I'm writting a Twitter component. What should I do later to
>> contribute
>> > it to the project?
>> That is fantastic. See the contribution wiki page:
>> http://camel.apache.org/contributing.html
>>
>>
>> >
>> > Bruno Borges
>> > blog.brunoborges.com.br
>> > +55 21 76727099
>> >
>> > "The glory of great men should always be
>> > measured by the means they have used to
>> > acquire it."
>> > - Francois de La Rochefoucauld
>> >
>> >
>> > On Thu, Mar 12, 2009 at 2:33 AM, Claus Ibsen <cl...@gmail.com>
>> wrote:
>> >
>> >> On Thu, Mar 12, 2009 at 6:25 AM, Bruno Borges <br...@gmail.com>
>> >> wrote:
>> >> > Yes, but the second endpoint doesn't get the message correctly as the
>> >> file
>> >> > has already been pulled out.
>> >> Are you using Camel 1.x? The file component has been totally rewritten
>> in
>> >> 2.0.
>> >>
>> >> You can then send to an intermediate endpoint and then multicast from it
>> >>
>> >> from(file).to(seda:foo);
>> >> from(seda:foo).multicast().to(a, b, c);
>> >>
>> >> You can use the .convertBodyTo(String.class) if you want to load the
>> >> file content and store that as payload instead of a java.io.File
>> >> handle
>> >> from(file).convertBodyTo(String.class).to(seda:foo);
>> >>
>> >>
>> >>
>> >>
>> >> >
>> >> >
>> >> >
>> >> > Bruno Borges
>> >> > blog.brunoborges.com.br
>> >> > +55 21 76727099
>> >> >
>> >> > "The glory of great men should always be
>> >> > measured by the means they have used to
>> >> > acquire it."
>> >> > - Francois de La Rochefoucauld
>> >> >
>> >> >
>> >> > On Thu, Mar 12, 2009 at 1:31 AM, Claus Ibsen <cl...@gmail.com>
>> >> wrote:
>> >> >
>> >> >> On Wed, Mar 11, 2009 at 9:18 PM, Bruno Borges <
>> bruno.borges@gmail.com>
>> >> >> wrote:
>> >> >> > What is the best option to do a multicasting from a file polling
>> >> >> endpoint?
>> >> >> Do you care to explain a bit more in details what you excacty mean?
>> >> >>
>> >> >> Using this will send the same message to a,b and c simultaneously:
>> >> >> from(file).multicast().to(a, b, c);
>> >> >>
>> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > Bruno Borges
>> >> >> > blog.brunoborges.com.br
>> >> >> > +55 21 76727099
>> >> >> >
>> >> >> > "The glory of great men should always be
>> >> >> > measured by the means they have used to
>> >> >> > acquire it."
>> >> >> > - Francois de La Rochefoucauld
>> >> >> > Sent from: Rio de janeiro Rj Brazil.
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Claus Ibsen
>> >> >> Apache Camel Committer
>> >> >>
>> >> >> Open Source Integration: http://fusesource.com
>> >> >> Blog: http://davsclaus.blogspot.com/
>> >> >>
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Claus Ibsen
>> >> Apache Camel Committer
>> >>
>> >> Open Source Integration: http://fusesource.com
>> >> Blog: http://davsclaus.blogspot.com/
>> >>
>> >
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/

Re: Multicast from File Polling

Posted by Bruno Borges <br...@gmail.com>.
By the way, is it possible to fork camel-test to 1.6.x ? That would be
great. =D

The code doesn't seem to be complicated to accomplish this.

Bruno Borges
blog.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
- Francois de La Rochefoucauld


On Thu, Mar 12, 2009 at 9:28 AM, Claus Ibsen <cl...@gmail.com> wrote:

> On Thu, Mar 12, 2009 at 1:25 PM, Bruno Borges <br...@gmail.com>
> wrote:
> > That's what I've been doing (with 1.6). Looks like I'm already doing the
> > only possible way. :-)
> >
> > Thanks!
> >
> > PS: I'm writting a Twitter component. What should I do later to
> contribute
> > it to the project?
> That is fantastic. See the contribution wiki page:
> http://camel.apache.org/contributing.html
>
>
> >
> > Bruno Borges
> > blog.brunoborges.com.br
> > +55 21 76727099
> >
> > "The glory of great men should always be
> > measured by the means they have used to
> > acquire it."
> > - Francois de La Rochefoucauld
> >
> >
> > On Thu, Mar 12, 2009 at 2:33 AM, Claus Ibsen <cl...@gmail.com>
> wrote:
> >
> >> On Thu, Mar 12, 2009 at 6:25 AM, Bruno Borges <br...@gmail.com>
> >> wrote:
> >> > Yes, but the second endpoint doesn't get the message correctly as the
> >> file
> >> > has already been pulled out.
> >> Are you using Camel 1.x? The file component has been totally rewritten
> in
> >> 2.0.
> >>
> >> You can then send to an intermediate endpoint and then multicast from it
> >>
> >> from(file).to(seda:foo);
> >> from(seda:foo).multicast().to(a, b, c);
> >>
> >> You can use the .convertBodyTo(String.class) if you want to load the
> >> file content and store that as payload instead of a java.io.File
> >> handle
> >> from(file).convertBodyTo(String.class).to(seda:foo);
> >>
> >>
> >>
> >>
> >> >
> >> >
> >> >
> >> > Bruno Borges
> >> > blog.brunoborges.com.br
> >> > +55 21 76727099
> >> >
> >> > "The glory of great men should always be
> >> > measured by the means they have used to
> >> > acquire it."
> >> > - Francois de La Rochefoucauld
> >> >
> >> >
> >> > On Thu, Mar 12, 2009 at 1:31 AM, Claus Ibsen <cl...@gmail.com>
> >> wrote:
> >> >
> >> >> On Wed, Mar 11, 2009 at 9:18 PM, Bruno Borges <
> bruno.borges@gmail.com>
> >> >> wrote:
> >> >> > What is the best option to do a multicasting from a file polling
> >> >> endpoint?
> >> >> Do you care to explain a bit more in details what you excacty mean?
> >> >>
> >> >> Using this will send the same message to a,b and c simultaneously:
> >> >> from(file).multicast().to(a, b, c);
> >> >>
> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> > Bruno Borges
> >> >> > blog.brunoborges.com.br
> >> >> > +55 21 76727099
> >> >> >
> >> >> > "The glory of great men should always be
> >> >> > measured by the means they have used to
> >> >> > acquire it."
> >> >> > - Francois de La Rochefoucauld
> >> >> > Sent from: Rio de janeiro Rj Brazil.
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Claus Ibsen
> >> >> Apache Camel Committer
> >> >>
> >> >> Open Source Integration: http://fusesource.com
> >> >> Blog: http://davsclaus.blogspot.com/
> >> >>
> >> >
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> Apache Camel Committer
> >>
> >> Open Source Integration: http://fusesource.com
> >> Blog: http://davsclaus.blogspot.com/
> >>
> >
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
>

Re: Multicast from File Polling

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Mar 12, 2009 at 1:25 PM, Bruno Borges <br...@gmail.com> wrote:
> That's what I've been doing (with 1.6). Looks like I'm already doing the
> only possible way. :-)
>
> Thanks!
>
> PS: I'm writting a Twitter component. What should I do later to contribute
> it to the project?
That is fantastic. See the contribution wiki page:
http://camel.apache.org/contributing.html


>
> Bruno Borges
> blog.brunoborges.com.br
> +55 21 76727099
>
> "The glory of great men should always be
> measured by the means they have used to
> acquire it."
> - Francois de La Rochefoucauld
>
>
> On Thu, Mar 12, 2009 at 2:33 AM, Claus Ibsen <cl...@gmail.com> wrote:
>
>> On Thu, Mar 12, 2009 at 6:25 AM, Bruno Borges <br...@gmail.com>
>> wrote:
>> > Yes, but the second endpoint doesn't get the message correctly as the
>> file
>> > has already been pulled out.
>> Are you using Camel 1.x? The file component has been totally rewritten in
>> 2.0.
>>
>> You can then send to an intermediate endpoint and then multicast from it
>>
>> from(file).to(seda:foo);
>> from(seda:foo).multicast().to(a, b, c);
>>
>> You can use the .convertBodyTo(String.class) if you want to load the
>> file content and store that as payload instead of a java.io.File
>> handle
>> from(file).convertBodyTo(String.class).to(seda:foo);
>>
>>
>>
>>
>> >
>> >
>> >
>> > Bruno Borges
>> > blog.brunoborges.com.br
>> > +55 21 76727099
>> >
>> > "The glory of great men should always be
>> > measured by the means they have used to
>> > acquire it."
>> > - Francois de La Rochefoucauld
>> >
>> >
>> > On Thu, Mar 12, 2009 at 1:31 AM, Claus Ibsen <cl...@gmail.com>
>> wrote:
>> >
>> >> On Wed, Mar 11, 2009 at 9:18 PM, Bruno Borges <br...@gmail.com>
>> >> wrote:
>> >> > What is the best option to do a multicasting from a file polling
>> >> endpoint?
>> >> Do you care to explain a bit more in details what you excacty mean?
>> >>
>> >> Using this will send the same message to a,b and c simultaneously:
>> >> from(file).multicast().to(a, b, c);
>> >>
>> >>
>> >> >
>> >> >
>> >> >
>> >> > Bruno Borges
>> >> > blog.brunoborges.com.br
>> >> > +55 21 76727099
>> >> >
>> >> > "The glory of great men should always be
>> >> > measured by the means they have used to
>> >> > acquire it."
>> >> > - Francois de La Rochefoucauld
>> >> > Sent from: Rio de janeiro Rj Brazil.
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Claus Ibsen
>> >> Apache Camel Committer
>> >>
>> >> Open Source Integration: http://fusesource.com
>> >> Blog: http://davsclaus.blogspot.com/
>> >>
>> >
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/

Re: Multicast from File Polling

Posted by Bruno Borges <br...@gmail.com>.
That's what I've been doing (with 1.6). Looks like I'm already doing the
only possible way. :-)

Thanks!

PS: I'm writting a Twitter component. What should I do later to contribute
it to the project?

Bruno Borges
blog.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
- Francois de La Rochefoucauld


On Thu, Mar 12, 2009 at 2:33 AM, Claus Ibsen <cl...@gmail.com> wrote:

> On Thu, Mar 12, 2009 at 6:25 AM, Bruno Borges <br...@gmail.com>
> wrote:
> > Yes, but the second endpoint doesn't get the message correctly as the
> file
> > has already been pulled out.
> Are you using Camel 1.x? The file component has been totally rewritten in
> 2.0.
>
> You can then send to an intermediate endpoint and then multicast from it
>
> from(file).to(seda:foo);
> from(seda:foo).multicast().to(a, b, c);
>
> You can use the .convertBodyTo(String.class) if you want to load the
> file content and store that as payload instead of a java.io.File
> handle
> from(file).convertBodyTo(String.class).to(seda:foo);
>
>
>
>
> >
> >
> >
> > Bruno Borges
> > blog.brunoborges.com.br
> > +55 21 76727099
> >
> > "The glory of great men should always be
> > measured by the means they have used to
> > acquire it."
> > - Francois de La Rochefoucauld
> >
> >
> > On Thu, Mar 12, 2009 at 1:31 AM, Claus Ibsen <cl...@gmail.com>
> wrote:
> >
> >> On Wed, Mar 11, 2009 at 9:18 PM, Bruno Borges <br...@gmail.com>
> >> wrote:
> >> > What is the best option to do a multicasting from a file polling
> >> endpoint?
> >> Do you care to explain a bit more in details what you excacty mean?
> >>
> >> Using this will send the same message to a,b and c simultaneously:
> >> from(file).multicast().to(a, b, c);
> >>
> >>
> >> >
> >> >
> >> >
> >> > Bruno Borges
> >> > blog.brunoborges.com.br
> >> > +55 21 76727099
> >> >
> >> > "The glory of great men should always be
> >> > measured by the means they have used to
> >> > acquire it."
> >> > - Francois de La Rochefoucauld
> >> > Sent from: Rio de janeiro Rj Brazil.
> >> >
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> Apache Camel Committer
> >>
> >> Open Source Integration: http://fusesource.com
> >> Blog: http://davsclaus.blogspot.com/
> >>
> >
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
>

Re: Multicast from File Polling

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Mar 12, 2009 at 6:25 AM, Bruno Borges <br...@gmail.com> wrote:
> Yes, but the second endpoint doesn't get the message correctly as the file
> has already been pulled out.
Are you using Camel 1.x? The file component has been totally rewritten in 2.0.

You can then send to an intermediate endpoint and then multicast from it

from(file).to(seda:foo);
from(seda:foo).multicast().to(a, b, c);

You can use the .convertBodyTo(String.class) if you want to load the
file content and store that as payload instead of a java.io.File
handle
from(file).convertBodyTo(String.class).to(seda:foo);




>
>
>
> Bruno Borges
> blog.brunoborges.com.br
> +55 21 76727099
>
> "The glory of great men should always be
> measured by the means they have used to
> acquire it."
> - Francois de La Rochefoucauld
>
>
> On Thu, Mar 12, 2009 at 1:31 AM, Claus Ibsen <cl...@gmail.com> wrote:
>
>> On Wed, Mar 11, 2009 at 9:18 PM, Bruno Borges <br...@gmail.com>
>> wrote:
>> > What is the best option to do a multicasting from a file polling
>> endpoint?
>> Do you care to explain a bit more in details what you excacty mean?
>>
>> Using this will send the same message to a,b and c simultaneously:
>> from(file).multicast().to(a, b, c);
>>
>>
>> >
>> >
>> >
>> > Bruno Borges
>> > blog.brunoborges.com.br
>> > +55 21 76727099
>> >
>> > "The glory of great men should always be
>> > measured by the means they have used to
>> > acquire it."
>> > - Francois de La Rochefoucauld
>> > Sent from: Rio de janeiro Rj Brazil.
>> >
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>>
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/

Re: Multicast from File Polling

Posted by Bruno Borges <br...@gmail.com>.
Yes, but the second endpoint doesn't get the message correctly as the file
has already been pulled out.



Bruno Borges
blog.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
- Francois de La Rochefoucauld


On Thu, Mar 12, 2009 at 1:31 AM, Claus Ibsen <cl...@gmail.com> wrote:

> On Wed, Mar 11, 2009 at 9:18 PM, Bruno Borges <br...@gmail.com>
> wrote:
> > What is the best option to do a multicasting from a file polling
> endpoint?
> Do you care to explain a bit more in details what you excacty mean?
>
> Using this will send the same message to a,b and c simultaneously:
> from(file).multicast().to(a, b, c);
>
>
> >
> >
> >
> > Bruno Borges
> > blog.brunoborges.com.br
> > +55 21 76727099
> >
> > "The glory of great men should always be
> > measured by the means they have used to
> > acquire it."
> > - Francois de La Rochefoucauld
> > Sent from: Rio de janeiro Rj Brazil.
> >
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
>

Re: Multicast from File Polling

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Mar 11, 2009 at 9:18 PM, Bruno Borges <br...@gmail.com> wrote:
> What is the best option to do a multicasting from a file polling endpoint?
Do you care to explain a bit more in details what you excacty mean?

Using this will send the same message to a,b and c simultaneously:
from(file).multicast().to(a, b, c);


>
>
>
> Bruno Borges
> blog.brunoborges.com.br
> +55 21 76727099
>
> "The glory of great men should always be
> measured by the means they have used to
> acquire it."
> - Francois de La Rochefoucauld
> Sent from: Rio de janeiro Rj Brazil.
>



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/