Announcement Announcement Module
No announcement yet.
Is it possible to add/remove routes dynamically? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is it possible to add/remove routes dynamically?


    In my application the routing configuration can be configured externally by users - they can add and remove sources and destinations dynamically - is it possible to achieve this with SI?
    Is it possible to add/remove routes (channels and end-points) to the ApplicationContext after it was configured (and started)?

    I thought about dynamically generating XML files and then loading them into different application contexts but this is far from being elegant.

    Thanks in advance,

  • #2
    Hi ilyakn,

    I was wondering the same scene for my SI app What I'm testing is integrating OSGI with my SI app so I can control the context dynamically.

    Spring has a project, Dynamic Modules. Take a look and evaluate if is what you are wondering.


    • #3
      There is two concepts in your question (IMO).

      The first one is the possibility of choosing at runtime which route will be used by a specific message. Such a concept is known as "Routing Slip" Pattern. As far as I understood Mark Fisher declaration, Spring Integration (SI) doesn't provide composite pattern at this time, but some of them (Routing Slip for instance) are planned (but I have no clue for the When Question)

      The second concept is dynamic loading of a new route. This is that concept that explains nestabur. So if you create a new Processing Stage, you can deploy it to your OSGI container and it will be immediatly available (hot deploy).

      Now you just have to upgrade your RoutingSlip (an XML file that describe each stages) to use this new module.


      • #4
        Is there a way to do hot deploy in non osgi environment?