You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "John D. Ament" <jo...@gmail.com> on 2013/07/26 18:41:29 UTC

Recipient List & Multitenant ESBs

Hi all

I have a somewhat interesting use case.  I want to create an ESB that has
some level of multitenancy in mind.  What I'm thinking is that I'll have a
single end point that acts as the entry, in this case a SOAP based web
service.  I'm going to take the data from this webservice and put it on to
a queue that is defined dynamically, and allow a camel route to process
data from this queue, convert it once and twice.

The problem I'm seeing is around the definition of these queues.  Is it
possible that a queue, or even route "activemq://foo1" be created
dynamically at runtime without doing anything else? It's almost like a
route prototype with some kind of variable substitution.  I think part of
my solution should use http://camel.apache.org/recipient-list.html since I
need to essentially send data in a certain order to different endpoints.

Any thoughts on this approach?

John

Re: Recipient List & Multitenant ESBs

Posted by Claus Ibsen <cl...@gmail.com>.
On Sun, Jul 28, 2013 at 9:05 PM, John D. Ament <jo...@gmail.com> wrote:
> Yes, yes of course.  Is there a best practice to doing this?
>
> What about this question?
>
> with ${body..}, if I'm sending my own object as the message, does that
> become body and then I can use a parameter on it to represent the value?
>
>

Can you elaborate what you mean? Its not to clear to me what you ask about.


>
> On Sun, Jul 28, 2013 at 4:01 AM, Claus Ibsen <cl...@gmail.com> wrote:
>
>> You can add and remove routes on the fly. Then each route can be
>> independent and thus allow a level of multi tenancy.
>>
>> On Sat, Jul 27, 2013 at 2:32 PM, John D. Ament <jo...@gmail.com>
>> wrote:
>> > Hmm yes I had seen that, with ${body..}, if I'm sending my own object as
>> > the message, does that become body and then I can use a parameter on it
>> to
>> > represent the value?  (Really all that does is remove a call to
>> > String.format)
>> >
>> > Is there an easy way to dynamically bind to endpoints?  This is the part
>> > that I'm thinking of using a polling consumer.
>> >
>> > Thanks,
>> >
>> > John
>> >
>> >
>> > On Sat, Jul 27, 2013 at 4:16 AM, Claus Ibsen <cl...@gmail.com>
>> wrote:
>> >
>> >> Hi
>> >>
>> >> Yes Apache ActiveMQ can create queues on the fly (does this by default)
>> >>
>> >> And you can use the receipient list in Camel for "dynamic to", see:
>> >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>> >>
>> >> And there is some other EIPs for dynamic like routing slip, dynamic
>> >> router, content based router, etc.
>> >> http://camel.apache.org/eip
>> >>
>> >>
>> >> On Fri, Jul 26, 2013 at 6:41 PM, John D. Ament <jo...@gmail.com>
>> >> wrote:
>> >> > Hi all
>> >> >
>> >> > I have a somewhat interesting use case.  I want to create an ESB that
>> has
>> >> > some level of multitenancy in mind.  What I'm thinking is that I'll
>> have
>> >> a
>> >> > single end point that acts as the entry, in this case a SOAP based web
>> >> > service.  I'm going to take the data from this webservice and put it
>> on
>> >> to
>> >> > a queue that is defined dynamically, and allow a camel route to
>> process
>> >> > data from this queue, convert it once and twice.
>> >> >
>> >> > The problem I'm seeing is around the definition of these queues.  Is
>> it
>> >> > possible that a queue, or even route "activemq://foo1" be created
>> >> > dynamically at runtime without doing anything else? It's almost like a
>> >> > route prototype with some kind of variable substitution.  I think
>> part of
>> >> > my solution should use
>> http://camel.apache.org/recipient-list.htmlsince I
>> >> > need to essentially send data in a certain order to different
>> endpoints.
>> >> >
>> >> > Any thoughts on this approach?
>> >> >
>> >> > John
>> >>
>> >>
>> >>
>> >> --
>> >> Claus Ibsen
>> >> -----------------
>> >> Red Hat, Inc.
>> >> Email: cibsen@redhat.com
>> >> Twitter: davsclaus
>> >> Blog: http://davsclaus.com
>> >> Author of Camel in Action: http://www.manning.com/ibsen
>> >>
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> Email: cibsen@redhat.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Recipient List & Multitenant ESBs

Posted by "John D. Ament" <jo...@gmail.com>.
Yes, yes of course.  Is there a best practice to doing this?

What about this question?

with ${body..}, if I'm sending my own object as the message, does that
become body and then I can use a parameter on it to represent the value?



On Sun, Jul 28, 2013 at 4:01 AM, Claus Ibsen <cl...@gmail.com> wrote:

> You can add and remove routes on the fly. Then each route can be
> independent and thus allow a level of multi tenancy.
>
> On Sat, Jul 27, 2013 at 2:32 PM, John D. Ament <jo...@gmail.com>
> wrote:
> > Hmm yes I had seen that, with ${body..}, if I'm sending my own object as
> > the message, does that become body and then I can use a parameter on it
> to
> > represent the value?  (Really all that does is remove a call to
> > String.format)
> >
> > Is there an easy way to dynamically bind to endpoints?  This is the part
> > that I'm thinking of using a polling consumer.
> >
> > Thanks,
> >
> > John
> >
> >
> > On Sat, Jul 27, 2013 at 4:16 AM, Claus Ibsen <cl...@gmail.com>
> wrote:
> >
> >> Hi
> >>
> >> Yes Apache ActiveMQ can create queues on the fly (does this by default)
> >>
> >> And you can use the receipient list in Camel for "dynamic to", see:
> >> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
> >>
> >> And there is some other EIPs for dynamic like routing slip, dynamic
> >> router, content based router, etc.
> >> http://camel.apache.org/eip
> >>
> >>
> >> On Fri, Jul 26, 2013 at 6:41 PM, John D. Ament <jo...@gmail.com>
> >> wrote:
> >> > Hi all
> >> >
> >> > I have a somewhat interesting use case.  I want to create an ESB that
> has
> >> > some level of multitenancy in mind.  What I'm thinking is that I'll
> have
> >> a
> >> > single end point that acts as the entry, in this case a SOAP based web
> >> > service.  I'm going to take the data from this webservice and put it
> on
> >> to
> >> > a queue that is defined dynamically, and allow a camel route to
> process
> >> > data from this queue, convert it once and twice.
> >> >
> >> > The problem I'm seeing is around the definition of these queues.  Is
> it
> >> > possible that a queue, or even route "activemq://foo1" be created
> >> > dynamically at runtime without doing anything else? It's almost like a
> >> > route prototype with some kind of variable substitution.  I think
> part of
> >> > my solution should use
> http://camel.apache.org/recipient-list.htmlsince I
> >> > need to essentially send data in a certain order to different
> endpoints.
> >> >
> >> > Any thoughts on this approach?
> >> >
> >> > John
> >>
> >>
> >>
> >> --
> >> Claus Ibsen
> >> -----------------
> >> Red Hat, Inc.
> >> Email: cibsen@redhat.com
> >> Twitter: davsclaus
> >> Blog: http://davsclaus.com
> >> Author of Camel in Action: http://www.manning.com/ibsen
> >>
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>

Re: Recipient List & Multitenant ESBs

Posted by Claus Ibsen <cl...@gmail.com>.
You can add and remove routes on the fly. Then each route can be
independent and thus allow a level of multi tenancy.

On Sat, Jul 27, 2013 at 2:32 PM, John D. Ament <jo...@gmail.com> wrote:
> Hmm yes I had seen that, with ${body..}, if I'm sending my own object as
> the message, does that become body and then I can use a parameter on it to
> represent the value?  (Really all that does is remove a call to
> String.format)
>
> Is there an easy way to dynamically bind to endpoints?  This is the part
> that I'm thinking of using a polling consumer.
>
> Thanks,
>
> John
>
>
> On Sat, Jul 27, 2013 at 4:16 AM, Claus Ibsen <cl...@gmail.com> wrote:
>
>> Hi
>>
>> Yes Apache ActiveMQ can create queues on the fly (does this by default)
>>
>> And you can use the receipient list in Camel for "dynamic to", see:
>> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>>
>> And there is some other EIPs for dynamic like routing slip, dynamic
>> router, content based router, etc.
>> http://camel.apache.org/eip
>>
>>
>> On Fri, Jul 26, 2013 at 6:41 PM, John D. Ament <jo...@gmail.com>
>> wrote:
>> > Hi all
>> >
>> > I have a somewhat interesting use case.  I want to create an ESB that has
>> > some level of multitenancy in mind.  What I'm thinking is that I'll have
>> a
>> > single end point that acts as the entry, in this case a SOAP based web
>> > service.  I'm going to take the data from this webservice and put it on
>> to
>> > a queue that is defined dynamically, and allow a camel route to process
>> > data from this queue, convert it once and twice.
>> >
>> > The problem I'm seeing is around the definition of these queues.  Is it
>> > possible that a queue, or even route "activemq://foo1" be created
>> > dynamically at runtime without doing anything else? It's almost like a
>> > route prototype with some kind of variable substitution.  I think part of
>> > my solution should use http://camel.apache.org/recipient-list.htmlsince I
>> > need to essentially send data in a certain order to different endpoints.
>> >
>> > Any thoughts on this approach?
>> >
>> > John
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> Red Hat, Inc.
>> Email: cibsen@redhat.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.com
>> Author of Camel in Action: http://www.manning.com/ibsen
>>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Recipient List & Multitenant ESBs

Posted by "John D. Ament" <jo...@gmail.com>.
Hmm yes I had seen that, with ${body..}, if I'm sending my own object as
the message, does that become body and then I can use a parameter on it to
represent the value?  (Really all that does is remove a call to
String.format)

Is there an easy way to dynamically bind to endpoints?  This is the part
that I'm thinking of using a polling consumer.

Thanks,

John


On Sat, Jul 27, 2013 at 4:16 AM, Claus Ibsen <cl...@gmail.com> wrote:

> Hi
>
> Yes Apache ActiveMQ can create queues on the fly (does this by default)
>
> And you can use the receipient list in Camel for "dynamic to", see:
> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>
> And there is some other EIPs for dynamic like routing slip, dynamic
> router, content based router, etc.
> http://camel.apache.org/eip
>
>
> On Fri, Jul 26, 2013 at 6:41 PM, John D. Ament <jo...@gmail.com>
> wrote:
> > Hi all
> >
> > I have a somewhat interesting use case.  I want to create an ESB that has
> > some level of multitenancy in mind.  What I'm thinking is that I'll have
> a
> > single end point that acts as the entry, in this case a SOAP based web
> > service.  I'm going to take the data from this webservice and put it on
> to
> > a queue that is defined dynamically, and allow a camel route to process
> > data from this queue, convert it once and twice.
> >
> > The problem I'm seeing is around the definition of these queues.  Is it
> > possible that a queue, or even route "activemq://foo1" be created
> > dynamically at runtime without doing anything else? It's almost like a
> > route prototype with some kind of variable substitution.  I think part of
> > my solution should use http://camel.apache.org/recipient-list.htmlsince I
> > need to essentially send data in a certain order to different endpoints.
> >
> > Any thoughts on this approach?
> >
> > John
>
>
>
> --
> Claus Ibsen
> -----------------
> Red Hat, Inc.
> Email: cibsen@redhat.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>

Re: Recipient List & Multitenant ESBs

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yes Apache ActiveMQ can create queues on the fly (does this by default)

And you can use the receipient list in Camel for "dynamic to", see:
http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html

And there is some other EIPs for dynamic like routing slip, dynamic
router, content based router, etc.
http://camel.apache.org/eip


On Fri, Jul 26, 2013 at 6:41 PM, John D. Ament <jo...@gmail.com> wrote:
> Hi all
>
> I have a somewhat interesting use case.  I want to create an ESB that has
> some level of multitenancy in mind.  What I'm thinking is that I'll have a
> single end point that acts as the entry, in this case a SOAP based web
> service.  I'm going to take the data from this webservice and put it on to
> a queue that is defined dynamically, and allow a camel route to process
> data from this queue, convert it once and twice.
>
> The problem I'm seeing is around the definition of these queues.  Is it
> possible that a queue, or even route "activemq://foo1" be created
> dynamically at runtime without doing anything else? It's almost like a
> route prototype with some kind of variable substitution.  I think part of
> my solution should use http://camel.apache.org/recipient-list.html since I
> need to essentially send data in a certain order to different endpoints.
>
> Any thoughts on this approach?
>
> John



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen