You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Steve973 <st...@gmail.com> on 2021/12/23 13:20:48 UTC

Can ControlBus be used for custom management?

Hello.  It appears that the control bus component can only be used for two
commands (route and language), and for routes, you can only specify an
action (start, stop, etc).  What if we have a component that could also
benefit from management messages?  Would it make sense to have a third
command of "component", and allow arbitrary URI params that the component
understands?

Thanks,
Steve

Re: Can ControlBus be used for custom management?

Posted by Steve973 <st...@gmail.com>.
I have pushed up an update with the internal control channel:

https://github.com/Steve973/camel/tree/CAMEL-17154/components%2Fcamel-dynamic-router

I would love some feedback, if possible, whenever anyone has some time
after the holidays, or whenever.

On Thu, Dec 23, 2021, 10:46 PM Steve973 <st...@gmail.com> wrote:

> The code that is currently pushed up to my fork uses the seda component
> for the control channel, and a @Consume annotated method in the component
> class.  While this worked fine and served the purpose, I have not been
> satisfied that it is the best solution.  So, like you suggested, I am using
> the "remaining" portion of the URI to determine if it is a control channel
> message.  I think that it is a better solution.
>
> On Thu, Dec 23, 2021 at 9:28 AM Claus Ibsen <cl...@gmail.com> wrote:
>
>> What you can do is for your component to have a way to send "control"
>> messages to it that it understands, then users can do
>>
>> from xxx
>>   to acme:control?action=foo&arg=bar
>>
>>
>> On Thu, Dec 23, 2021 at 3:19 PM Claus Ibsen <cl...@gmail.com>
>> wrote:
>> >
>> > On Thu, Dec 23, 2021 at 2:21 PM Steve973 <st...@gmail.com> wrote:
>> > >
>> > > Hello.  It appears that the control bus component can only be used
>> for two
>> > > commands (route and language), and for routes, you can only specify an
>> > > action (start, stop, etc).  What if we have a component that could
>> also
>> > > benefit from management messages?  Would it make sense to have a third
>> > > command of "component", and allow arbitrary URI params that the
>> component
>> > > understands?
>> > >
>> >
>> > No that is not the design of this component - it is for the normal use
>> > cases, to manage routes.
>> >
>> >
>> >
>> > > Thanks,
>> > > Steve
>> >
>> >
>> >
>> > --
>> > 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: Can ControlBus be used for custom management?

Posted by Steve973 <st...@gmail.com>.
The code that is currently pushed up to my fork uses the seda component for
the control channel, and a @Consume annotated method in the component
class.  While this worked fine and served the purpose, I have not been
satisfied that it is the best solution.  So, like you suggested, I am using
the "remaining" portion of the URI to determine if it is a control channel
message.  I think that it is a better solution.

On Thu, Dec 23, 2021 at 9:28 AM Claus Ibsen <cl...@gmail.com> wrote:

> What you can do is for your component to have a way to send "control"
> messages to it that it understands, then users can do
>
> from xxx
>   to acme:control?action=foo&arg=bar
>
>
> On Thu, Dec 23, 2021 at 3:19 PM Claus Ibsen <cl...@gmail.com> wrote:
> >
> > On Thu, Dec 23, 2021 at 2:21 PM Steve973 <st...@gmail.com> wrote:
> > >
> > > Hello.  It appears that the control bus component can only be used for
> two
> > > commands (route and language), and for routes, you can only specify an
> > > action (start, stop, etc).  What if we have a component that could also
> > > benefit from management messages?  Would it make sense to have a third
> > > command of "component", and allow arbitrary URI params that the
> component
> > > understands?
> > >
> >
> > No that is not the design of this component - it is for the normal use
> > cases, to manage routes.
> >
> >
> >
> > > Thanks,
> > > Steve
> >
> >
> >
> > --
> > 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: Can ControlBus be used for custom management?

Posted by Claus Ibsen <cl...@gmail.com>.
What you can do is for your component to have a way to send "control"
messages to it that it understands, then users can do

from xxx
  to acme:control?action=foo&arg=bar


On Thu, Dec 23, 2021 at 3:19 PM Claus Ibsen <cl...@gmail.com> wrote:
>
> On Thu, Dec 23, 2021 at 2:21 PM Steve973 <st...@gmail.com> wrote:
> >
> > Hello.  It appears that the control bus component can only be used for two
> > commands (route and language), and for routes, you can only specify an
> > action (start, stop, etc).  What if we have a component that could also
> > benefit from management messages?  Would it make sense to have a third
> > command of "component", and allow arbitrary URI params that the component
> > understands?
> >
>
> No that is not the design of this component - it is for the normal use
> cases, to manage routes.
>
>
>
> > Thanks,
> > Steve
>
>
>
> --
> 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: Can ControlBus be used for custom management?

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Dec 23, 2021 at 2:21 PM Steve973 <st...@gmail.com> wrote:
>
> Hello.  It appears that the control bus component can only be used for two
> commands (route and language), and for routes, you can only specify an
> action (start, stop, etc).  What if we have a component that could also
> benefit from management messages?  Would it make sense to have a third
> command of "component", and allow arbitrary URI params that the component
> understands?
>

No that is not the design of this component - it is for the normal use
cases, to manage routes.



> Thanks,
> Steve



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