camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Garner, Kevin" <>
Subject @Produce, Interfaces, and Notification Events
Date Tue, 07 Nov 2017 19:07:31 GMT
We're using the event notification framework in Camel to perform logging of certain route metrics
based on ExchangeSentEvents. Generally this works just fine as long as the route we are monitoring
is part of a larger route where it is being called via something like a to(). If the sub-route
is used standalone and we inject it into the consumer using an interface and @Produce, the
proxy does not seem to generate ExchangeSentEvent or any other events off of the proxied route.
I can circumvent the issue by wrapping the route or using ProducerTemplate instead of an interface,
but both of those seem a bit tedious. 

Is the interface-based proxy expected to not produce events by design? The ProducerTemplate
seems to send them, but I wanted to hide the Camel APIs as much as possible from the consumer


// does NOT emit ExchangeSentEvent
@Produce(uri = "direct:test")
TestInterface test;

// does emit ExchangeSentEvent
@Produce(uri = "direct:wrapped-test")
TestInterface test;

// does emit ExchangeSentEvent
@Produce(uri = "direct:test")
ProducerTemplate testTemplate;

Thanks for any input,

View raw message