I am using Camel 2.17.3 and karaf 4.0.7 (also tried 4.0.1).
I have a Camel route that runs fine in Eclipse when a junit test starts it, but hangs when deployed to karaf. If I change the amqp: 'from' component to timer: the route runs fine in karaf.
My AMQP setup in the routebuilder is:
@Override
public void configure() throws Exception {
getContext().addComponent("amqp", AMQPComponent.amqpComponent(String.format("amqp://%s:%s?amqp.saslMechanisms=ANONYMOUS", AMQP_SERVICE_HOST, AMQP_SERVICE_PORT)));
Even this route will hang karaf, and run fine in Eclipse:
from("amqp:queue:myqueue").routeId("myRoute")
.log("temp")
In Karaf, when I say "hang", I observe these things:
- If I try to exit karaf, it hangs - I need to kill the process.
- If I try to stop the bundle, karaf hangs - I need to kill the process.
- Neither camel:context-list nor camel:route-list return anything
- I do not get a "route consuming from..." message in the log. This is all the output from starting the bundle:
2016-10-08 23:46:00,593 | INFO | nsole user karaf | bundle
| 90 - org.apache.aries.spifly.dynamic.bundle - 1.0.1 | Bundle Considered for SPI providers: mis-routes 2016-10-08 23:46:00,593 | INFO | nsole user karaf | bundle | 90 - org.apache.aries.spifly.dynamic.bundle - 1.0.1 | No 'SPI-Provider' Manifest header. Skipping bundle: mis-routes 2016-10-08 23:46:05,595 | INFO | ool-130-thread-1 | OsgiDefaultCamelContext | 56 - org.apache.camel.camel-core - 2.17.3 | Apache Camel 2.17.3 (CamelContext: mis-routes) is starting 2016-10-08 23:46:05,599 | INFO | ool-130-thread-1 | OsgiDefaultCamelContext | 56 - org.apache.camel.camel-core - 2.17.3 | MDC logging is enabled on CamelContext: mis-routes 2016-10-08 23:46:05,601 | INFO | ool-130-thread-1 | ManagedManagementStrategy | 56 - org.apache.camel.camel-core - 2.17.3 | JMX is enabled 2016-10-08 23:46:05,708 | INFO | ool-130-thread-1 | DefaultRuntimeEndpointRegistry | 56 - org.apache.camel.camel-core - 2.17.3 | Runtime endpoint registry is in extended mode gathering usage statistics of all incoming and outgoing endpoints (cache limit: 1000) 2016-10-08 23:46:05,804 | INFO | ool-130-thread-1 | OsgiDefaultCamelContext | 56 - org.apache.camel.camel-core - 2.17.3 | AllowUseOriginalMessage is enabled. If access to the original message is not needed, then its recommended to turn this option off as it may improve performance. 2016-10-08 23:46:05,805 | INFO | ool-130-thread-1 | OsgiDefaultCamelContext | 56 - org.apache.camel.camel-core - 2.17.3 | StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
Any help would be hugely appreciated. Thanks!