Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

"simple programatic" camel and OSGi

$
0
0
Hi all,

I have a fairly good understanding of OSGi, not so much of Camel internals.
I'm trying to start a simple camel route involving rabbitmq in an OSGi
container (simple file -> camel).
(and incidentally I'm using the scala DSL, and camel version 2.13.2, inside
a simple felix container)

My problem is (what seems to be) the usual:
Failed to resolve endpoint: rabbitmq://localhost/... due to: No component
found with scheme: rabbitmq

I would like to understand in "simple programatic terms" how these custom
endpoints get wired to the camel context, in an OSGi container.
By "simple" i mean, please no answer in the lines of "just use
karaf+spingdm+eclipse+maven+..." I know i'm missing something trivial, yet i
don't want to obfuscate my problem under a pile of libraries.
If someone could help before i dive too deep into the camel source code.
My understanding is that the camel-osgi bundle tracks starting bundles and
scans them for camel components, then registers the components to the
service registry (and maybe somewhere in camel).. yet it doesn't seem to
quite work this way.

This has been my approach so far:

step 0: simply define the route in my activator

=> Failed to resolve endpoint

step 2: add a dependency on the rabbitmq ComponentResolver (i noticed in the
webconsole that it was registered)

=> "got the rabbit" prints ok, but camel still Failed to resolve endpoint

step 3: explicitely resolve the rabbit in my context

=> "got the rabbit" prints ok and resolve doesn't fail, but camel still
Failed to resolve endpoint

Many thanks,
Arjun

Viewing all articles
Browse latest Browse all 5648

Trending Articles