Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto startup of routes failing when camel context autostartup = false #54

Open
mtgleeson opened this issue Nov 14, 2015 · 2 comments
Open

Comments

@mtgleeson
Copy link

I've created a new Grails (2.4.4) project with the routing plugin 1.4.1. I created a simple route but noticed that when I started the app it was starting the camel context but it wasn't auto starting the route ("Skipping starting of route XX as its configured with autoStartup=false").

The route is configured with autoStartup(true). I found that since Camel 2.12.5 if the camel context autoStartup=false then routes won't auto start and instead we have to use startAllRoutes() manually.

In RoutingGrailsPlugin the camelContext is defined with autoStartup:false which is causing the routes to not start automatically.

I would recommend adding startAllRoutes to RoutingGrailsPlugin.doWithDynamicMethods if (config.autoStartup != false). Or put a note up on the home page so new users are aware.

I'm currently starting all routes via Bootstrap.groovy:
def camelContextId = grailsApplication.config.grails.routing.camelContextId
grailsApplication.mainContext.getBean(camelContextId).startAllRoutes()

For more details read - http://camel.465427.n5.nabble.com/migrating-from-Camel-2-13-1-to-2-15-1-suddenly-all-routes-not-starting-td5765551.html

@aahutsal
Copy link
Collaborator

Thanks for your contribution. However, that plugin is not maintained any longer by origin authors. If you wish to contribute - I'll give you maintainer rights.

@aahutsal
Copy link
Collaborator

Btw - I've noticed that change been already applied in that fork: kenschwartz@4c16c5c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants