Logging: Making sure that messages are not lost

IBM MQ records all significant changes to the persistent data controlled by the queue manager in a recovery log.

This includes creating and deleting objects, persistent message updates, transaction states, changes to object attributes, and channel activities. The log contains the information we need to recover all updates to message queues by:

  • Keeping records of queue manager changes
  • Keeping records of queue updates for use by the restart process
  • Enable you to restore data after a hardware or software failure

However, IBM MQ also relies on the disk system hosting its files, including log files. If the disk system is itself unreliable, information, including log information, can still be lost.

CAUTION:We cannot move recovery logs to a different operating system.

  • What logs look like
    Logs consist of primary and secondary files, and a control file. You define the number and size of log files and where they are stored in the file system.
  • Types of logging
    In IBM MQ there are two ways of maintaining records of queue manager activities: circular logging and linear logging.
  • Use checkpointing to ensure complete recovery
    Both circular logging and linear logging queue managers support restart recovery. Regardless of how abruptly the previous instance of the queue manager terminates (for example a power outage) upon restart the queue manager restores its persistent state to the correct transactional state at the point of termination.
  • Calculating the size of the log
    Estimating the size of log a queue manager needs.
  • Manage logs
    From Version 9.1.0, IBM MQ supports automatic log management and automatic media recovery of linear logs. Circular logs are nearly self-managing, but sometimes need intervention to resolve space problems.
  • Use the log for recovery
    We can use information from the logs to help you recover from failures.
  • Protecting IBM MQ log files
    Do not touch the log files when a queue manager is running, recovery might be impossible. Use super user or mqm authority to protect log files against inadvertent modification.
  • Dumping the contents of the log using the dmpmqlog command
    How to use the dmpmqlog command to dump the contents of the queue manager log.

Parent topic: Configure high availability, recovery and restart