camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ariekenb <>
Subject @Consume creates multiple consumers when using multiple camel contexts
Date Wed, 24 Jun 2009 18:50:22 GMT

I just stumbled into an issue where using an @Consume annotation on a bean
ended up creating 2 consumers when that bean was deployed in an OSGi bundle
containing 2 camel contexts.

It appears 1 consumer is created for each @Consume annotation for each
context, even if the endpoint the @Consume references is only present in one
of the contexts.

This can cause not very obvious threading problems - a consumer might
unexpectedly receive messages in multiple threads if a new camel context is
added to the bundle.

I don't see any way to explicitly bind @Consume to a particular context. 
Has anyone ever considered adding an option to the annotation to specify a
context name?

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message