camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaddyOh <>
Subject Can I use a bean in place of a producer
Date Fri, 11 Dec 2015 19:04:01 GMT
This route seems to work fine in test. I've left out the bean specifications
for this context file for simplicity.  

    <camelContext xmlns="">

        <from uri="timer://spcs2radius?fixedRate=true&amp;period=10000"/>
        <bean ref="spcs2RadiusPosts" method="process"/>
successful route&amp;contentType=text/plain"/>

The bean does all of the work. It reads from  a database and if records
present it formats them into json and sends them to another internal system.
I will want this to deadletter if there is an exception in the processing. 
This is low volume route. Up to 10 times a day it will find data and write
it to the other system.

The producer sends an email confirmation that the route was completed. 
Other than the complexity of the bean doing all the work are there risks for
not having a custom producer to store the data in the other system and use a
splitter to also send the email? Put another way should I write a producer
or let the bean do the work?


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

View raw message