camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apara <>
Subject Re: How do I pair @Consume with @Produce on an interface?
Date Wed, 02 Jul 2014 15:50:39 GMT
So, still sticking with an interface, and trying to make each method put a
message on a different queue, I made these change:

    public interface Producer extends CriteriaServiceObserver {
        @Produce(uri = "direct://criteria.created.event")
        void created(CriteriaDocument criteria, Map state);

        @Produce(uri = "direct://criteria.updated.event")
        void updated(CriteriaDocument criteria, Map state);

        @Produce(uri = "direct://criteria.beforeDelete.event")
        void beforeDelete(CriteriaDocument criteria, Map state);

        @Produce(uri = "direct://criteria.afterDelete.event")
        void afterDelete(CriteriaDocument criteria, Map state);

    private Producer

However, now, jmsEventProducer is not initialized and remains null.  

I guess, I am really trying to avoid making multiple producer interfaces and
then tying them together in yet another component that simply implements my
observer and forwards the calls to these individual @Provider interfaces.

I noticed that @Produce can be applied to methods, but not quite sure how
that should work as I have not seen any examples of that yet.


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

View raw message