Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.11.0
    • Component/s: camel-core, eip
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Control Bus EIP
      http://www.eaipatterns.com/ControlBus.html

      I think we should consider a control bus EIP (eg implemented as a component).

      Then people can manage their Camel apps by sending messages to a control bus endpoint.

      For example to

      • start a route
      • stop a route
      • get statistics
      • shutdown camel (???)

      eg a bit like what you can do with JMX management, but over Camel endpoint.

      To trick would be to find a message format the control bus can parse. For example should we use a header for the command.

      But that also makes it easier for people to start|stop a route from a route. Now just send a message to an endpoint, for example using wire tap.

      from x
        to y
        wire tap ("controlbus:action=start-route&param=route2")
      

      Would need to give some more thought about the syntax and what to be supported by the control bus.

        Activity

        Hide
        Claus Ibsen added a comment -

        If we go a bit wacky then the control bus, could potential also be used for creating new routes, eg if the message body is an XML representation of a route. Likewise for updating existing route. Eg what we offer over JMX for that, and also what the Camel Karaf commands uses to show routes etc.

        Show
        Claus Ibsen added a comment - If we go a bit wacky then the control bus, could potential also be used for creating new routes, eg if the message body is an XML representation of a route. Likewise for updating existing route. Eg what we offer over JMX for that, and also what the Camel Karaf commands uses to show routes etc.
        Hide
        Alan Foster added a comment -

        @Claus Ibsen Just a question about your notation, is the "=" supposed to be a query string? ie

        wiretap("controlbus:name?action=start-route&param=route2")
        

        I can look into this, but if you wish to do this instead of me I understand

        Alan

        Show
        Alan Foster added a comment - @ Claus Ibsen Just a question about your notation, is the "=" supposed to be a query string? ie wiretap( "controlbus:name?action=start-route&param=route2" ) I can look into this, but if you wish to do this instead of me I understand Alan
        Hide
        Claus Ibsen added a comment -

        No I have not fleshed out any details yet.
        Just wanted to record the JIRA because the control bus EIP is a bit missing in Camel.

        Fell free to dive into this.

        Would love more feedback from other Camel riders about this.
        For starters being able to manage routes would be nice, eg just to start|stop|suspend|resume|shutdown|remove etc. And notice that when stopping/shutdown there is an optional timeout as well.

        And the uri syntax is not set in stone. Feel free to give that some thought.

        Show
        Claus Ibsen added a comment - No I have not fleshed out any details yet. Just wanted to record the JIRA because the control bus EIP is a bit missing in Camel. Fell free to dive into this. Would love more feedback from other Camel riders about this. For starters being able to manage routes would be nice, eg just to start|stop|suspend|resume|shutdown|remove etc. And notice that when stopping/shutdown there is an optional timeout as well. And the uri syntax is not set in stone. Feel free to give that some thought.
        Hide
        Chris Wash added a comment - - edited

        My client is requesting this...

        Agreed that the big outstanding question is around message format, if it can be standardized. Spring Integration does support this EIP - but I haven't looked at the implementation. To the extent that the command syntax can align with any exposed JMX capabilities would help... perhaps a convention for calling operations on a specific MBean? I'm not an expert on JMX - understand there is a security model and stuff in place there as well that should be thought out, but cohesion between the two interfaces would be a big plus in my book.

        Show
        Chris Wash added a comment - - edited My client is requesting this... Agreed that the big outstanding question is around message format, if it can be standardized. Spring Integration does support this EIP - but I haven't looked at the implementation. To the extent that the command syntax can align with any exposed JMX capabilities would help... perhaps a convention for calling operations on a specific MBean? I'm not an expert on JMX - understand there is a security model and stuff in place there as well that should be thought out, but cohesion between the two interfaces would be a big plus in my book.
        Hide
        Claus Ibsen added a comment -

        Yeah the control bus ought to be able to use the management API. That allows you to control much out of the box then.
        Though for people disabling JMX we may offer limited management using the API on CamelContext to control routes etc.

        We should also allow to gather statistics which you can do from the management API. But in bulk as well.
        Then you can do alike ActiveMQ which supports a plugin to gather stats, by sending a message to a queue.
        http://activemq.apache.org/statisticsplugin.html

        The SI control bus, is based on executing either a Spring Expression or Groovy expression, which you send in the message body.

        Show
        Claus Ibsen added a comment - Yeah the control bus ought to be able to use the management API. That allows you to control much out of the box then. Though for people disabling JMX we may offer limited management using the API on CamelContext to control routes etc. We should also allow to gather statistics which you can do from the management API. But in bulk as well. Then you can do alike ActiveMQ which supports a plugin to gather stats, by sending a message to a queue. http://activemq.apache.org/statisticsplugin.html The SI control bus, is based on executing either a Spring Expression or Groovy expression, which you send in the message body.
        Hide
        Alan Foster added a comment -

        Hi, I'm sorry for not posting any updates on this. I've been very tied with commitments recently and I haven't been able to get a solid start to this sadly

        If anyone wants to complete this task then I am okay with this.

        Apologies
        Alan

        Show
        Alan Foster added a comment - Hi, I'm sorry for not posting any updates on this. I've been very tied with commitments recently and I haven't been able to get a solid start to this sadly If anyone wants to complete this task then I am okay with this. Apologies Alan
        Hide
        Claus Ibsen added a comment -

        Lets get a first cut into Camel, and then we can expand on this EIP later.

        Show
        Claus Ibsen added a comment - Lets get a first cut into Camel, and then we can expand on this EIP later.
        Hide
        Claus Ibsen added a comment -

        Added a simple ControlBus EIP as a component, which makes it easy, as you just send a message to an endpoint.

        Some docs here
        https://cwiki.apache.org/confluence/display/CAMEL/ControlBus+Component

        Show
        Claus Ibsen added a comment - Added a simple ControlBus EIP as a component, which makes it easy, as you just send a message to an endpoint. Some docs here https://cwiki.apache.org/confluence/display/CAMEL/ControlBus+Component
        Hide
        Claus Ibsen added a comment -

        We got a basic control bus now. We can always later enhance if needed.

        Show
        Claus Ibsen added a comment - We got a basic control bus now. We can always later enhance if needed.

          People

          • Assignee:
            Claus Ibsen
            Reporter:
            Claus Ibsen
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development