camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten <cars...@kopis.de>
Subject Custom ShutdownStrategy to persist inflight exchanges?
Date Mon, 10 Nov 2014 15:42:23 GMT
Hi all,

I'm thinking about implementing a custom ShutdownStrategy to persist 
inflight exchanges to disk (or database). The reason for this is that we 
can't rely on a Messaging middleware to take care of the persistence, 
but we want to be able to shutdown routes without loosing those inflight 
exchanges.

Is anyone doing something like this?

My initial thought was this:

In my custom ShutdownStrategy I persist the inflight exchanges of one 
route to a directory in the local filesystem on shutdown, going for a 
fast shutdown. When the application comes up again, one route is 
listening for files in that directory and picking up previously stored 
messages again, deleting the files after they are handed over to the 
original route. If there are inflight exchanges on the 2nd route when 
receiving a shutdown, that inflight exchanges can be discarded.

I'd appreciate any feedback if someone is already doing this kind of 
shutdown or if I should avoid going down this path.


thanks,

Carsten

Mime
View raw message