Yes that is fine to only call stop on server shutdown.
Then you can reuse the same producer template.

Only if you do not use the template anymore you can call stop before.


On Wed, Aug 31, 2016 at 8:33 AM, atluris <atluri.fo...@gmail.com> wrote:
> Hi,
>
> Based on below article, we are creating single producer template instance
> and using it as and when needed to execute the camel route explicitly.
>
> http://camel.apache.org/why-does-camel-use-too-many-threads-with-producertemplate.html
>
> We are calling start() during server startup and stop() during shutdown. Is
> that fine, or do we need to call start() and stop() during each message
> invocation?
>
> Thanks & Regards,
> Srinivas Atluri.
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/when-to-call-start-and-stop-on-ProducerTemplate-tp5787020.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to