0

I am considering using Apache camel for implementing EIP patterns in our solution. Our requirement is to build a fault-tolerant system which can recover from failures.

I understand the native error handling capabilities available with Apache Camel (dead letter channels) and they satisfy my requirements.

However, it is not clear to me on how to configure our solution so that we can recover from a fatal error, say JVM crash.

What is the best way to have the Camel app restart from last known state after a JVM-crash, consider I am not using a persistent queue to maintain the state of the system?

I think Spring Integration provides configuration to create Persistent Channels. Does Apache Camel support a similar configuration?

Artem Bilan
  • 113,505
  • 11
  • 91
  • 118
Marquis
  • 9
  • 1

1 Answers1

2

Yes you can use messaging for persistant storage so you can built fault tolerant applications that can survive a JVM crash.

What you choose to use as persistent storage is your choice. For example you can use JMS message brokers such as Apache ActiveMQ / Artemis and use the Camel JMS component for routes where you can use transacted JMS to ensure messages are not dequeded unless they are succesfully processed, so if the JVM crash half-way then the message is still on the broker, and can be re-processed when the JVM is up and running again etc.

But there are different ways of designing a fault tolerant system. Apache Camel is open ended in this regard and allows your freedom.

Claus Ibsen
  • 56,060
  • 7
  • 50
  • 65