It would be nice to be able to use Camel routes for persistence, since we 
already persist other data this way. When route is about to be stopped, pass a 
special message to a route, that will persist processor data to database using 
Camel endpoint. And in the same way, when route is to be started, endpoint will 
read data from database and initialize the processor. Otherwise we will have to 
include DB related jars/code to do the same what Camel already does.

Thank you, Jan

> -----Original Message-----
> From: Claus Ibsen <claus.ib...@gmail.com>
> Sent: Thursday, June 6, 2024 1:16 PM
> To: users@camel.apache.org
> Subject: Re: Processor data persistence during route stop
>
> Hi
>
> That is something you need to implement yourself to have this kind of
> persistence. Your processor or beans can extend ServiceSupport (or
> implement Service) from Camel then you have doStart/doStop methods that
> Camel calls for you.
>
>
> On Thu, Jun 6, 2024 at 11:18 AM Branko Husarik, Wood & Co.
> <branko.husa...@wood.cz.invalid> wrote:
>
> > Hello,
> >
> >
> >
> > I would like to ask about the proper saving and loading of processor
> > variables to the database at the route stop. I am trying to use
> > RoutePolicySupport to find out the system shutdown, but I don’t see any
> > nice solution for how to persist the state of some processors that could be
> > restored after startup.
> >
> > Please, can you give me tips? Thank you
> >
> >
> >
> > Best Regards
> >
> >
> >
> > Branko Husarik
> >
> >
> >
> > *Braňko Husárik*
> > Calypso Developer
> > IT Development
> > email: branko.husa...@wood.cz
> > m: +420 606 022 474
> >
> > WOOD & Company
> > Palladium, nám. Republiky 1079/1a
> > 110 00 Prague 1, Czech Republic
> > wood.com
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > ------------------------------
> > DISCLAIMER WOOD & Company Financial Services, a.s. and its branches are
> > authorized and regulated by the CNB as Home State regulator and in Poland
> > by the KNF, in Slovakia by the NBS, in Italy by the CONSOB and in the UK by
> > the FCA as Host State regulators. For further information about WOOD & Co.,
> > its investment services, financial instruments and associated risks,
> > safeguard client assets (incl. compensation schemes) and contractual
> > relationship please see our website at www.wood.com under section
> > Corporate Governance. Unless otherwise stated, this transmission is neither
> > an offer nor the solicitation of an offer to sell or purchase any
> > investment. All estimates, opinions and other information contained herein
> > are subject to change without notice and are provided in good faith but
> > without legal responsibility or liability. Opinion may be personal to the
> > author and may not reflect the opinions of WOOD & Co. Communications from
> > sales persons, sales traders or traders should not be regarded as
> > investment research and may contain opinions or trading ideas which are
> > different from WOOD & Co. investment research opinions. This e-mail and any
> > attachments are confidential and may be privileged or otherwise protected
> > from disclosure. If you are not a named addressee you must not use,
> > disclose, distribute, copy, print or rely on this e-mail and any of its
> > attachments. Please notify the sender that you have received this email by
> > mistake by replying to the email, and then delete the email and any copies
> > of it. Although WOOD & Co. routinely screens e-mails for viruses,
> > addressees should scan this e-mail and any attachments for viruses. WOOD &
> > Co. makes no representation or warranty as to the absence of viruses in
> > this e-mail or any attachments. Please note that to ensure regulatory
> > compliance and for the protection of our clients and business, we may
> > monitor and read e-mails sent to and from our server(s).
> >
>
>
> --
> Claus Ibsen
> -----------------
> @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2

Jan Bares
Head of Calypso development | IT Development

Phone: +420 222 096 457
Mobile: +420 776 333 676
Email: jan.ba...@wood.cz

WOOD & Company
Palladium, nám. Republiky 1079/1a, 110 00 Prague 1, Czech Republic | wood.cz





________________________________
DISCLAIMER
WOOD & Company Financial Services, a.s. and its branches are authorized and 
regulated by the CNB as Home State regulator and in Poland by the KNF, in 
Slovakia by the NBS, in Italy by the CONSOB and in the UK by the FCA as Host 
State regulators. For further information about WOOD & Co., its investment 
services, financial instruments and associated risks, safeguard client assets 
(incl. compensation schemes) and contractual relationship please see our 
website at www.wood.com<http://www.wood.com/> under section Corporate 
Governance. Unless otherwise stated, this transmission is neither an offer nor 
the solicitation of an offer to sell or purchase any investment. All estimates, 
opinions and other information contained herein are subject to change without 
notice and are provided in good faith but without legal responsibility or 
liability. Opinion may be personal to the author and may not reflect the 
opinions of WOOD & Co. Communications from sales persons, sales traders or 
traders should not be regarded as investment research and may contain opinions 
or trading ideas which are different from WOOD & Co. investment research 
opinions. This e-mail and any attachments are confidential and may be 
privileged or otherwise protected from disclosure. If you are not a named 
addressee you must not use, disclose, distribute, copy, print or rely on this 
e-mail and any of its attachments. Please notify the sender that you have 
received this email by mistake by replying to the email, and then delete the 
email and any copies of it. Although WOOD & Co. routinely screens e-mails for 
viruses, addressees should scan this e-mail and any attachments for viruses. 
WOOD & Co. makes no representation or warranty as to the absence of viruses in 
this e-mail or any attachments. Please note that to ensure regulatory 
compliance and for the protection of our clients and business, we may monitor 
and read e-mails sent to and from our server(s).

Reply via email to