Handling IOException in ActiveMQ

When you encounter IOException trying to persist a message on the disk, you know something has gone wrong. One of two things usually happen:

  • Either your disk is dead, or disconnected in case you use network disks
  • Or you just don’t have more space on the disk

Depending on the type of the exception you may encounter, you might want to take a different action. For upcoming 5.3.1 release we implemented fully configurable IOException handling which can be tuned to your need.

A default handler stops the broker when the message persistence fails in all cases except when it detects that the failure is caused by the lack of space on the disk. In the later case, it just wait for the space to be reclaimed and continues.

For more information on this topic, check http://activemq.apache.org/configurable-ioexception-handling.html

1 comment

Comments are closed.