Journal management
As part of your backup strategy, take care of your journal receivers. It is useful to remove journal receivers from the WebSphere MQ libraries, in order to:
- Release space; this applies to all journal receivers
- Improve the performance when starting (STRMQM)
- Improve the performance of recreating objects (RCRMQMOBJ)
Before deleting a journal receiver, be sure that:
- You have a backup copy.
- You no longer need the journal receiver.
Journal receivers can be removed from the queue manager library after they have been detached from the journals and saved, provided that they are available for restoration if needed for a recovery operation.
The concept of journal management is shown in Figure 12.
Figure 12. WebSphere MQ for iSeries journaling
It is important to know how far back in the journals WebSphere MQ is likely to need to go, in order to determine when a journal receiver that has been backed up can be removed from the queue manager library, and when the backup itself can be discarded.
To help determine this time, WebSphere MQ issues two messages to the queue manager message queue (QMQMMSG in the queue manager library) when:
- It starts up
- It changes a local journal receiver
- You use RCDMQIMG to force a checkpoint
These messages are:
- AMQ7460
- Startup recovery point. This message defines the date and time of the startup entry from which WebSphere MQ replays the journal in the event of a startup recovery pass. If the journal receiver that contains this record is available in the WebSphere MQ libraries, this message also contains the name of the journal receiver containing the record.
- AMQ7462
- Oldest media recovery entry. This message defines the date and time of the oldest entry to use to recreate an object from its media image.
The journal receiver identified is the oldest one required. Any other WebSphere MQ journal receivers with older creation dates are no longer needed. If only stars are displayed, we need to restore backups from the date indicated to determine which is the oldest journal receiver.
When these messages are logged, WebSphere MQ also writes a user space object to the queue manager library that contains only one entry: the name of the oldest journal receiver that needs to be kept on the system. This user space is called AMQJRNINF, and the data is written in the format:
JJJJJJJJJJLLLLLLLLLLYYYYMMDDHHMMSSmmmwhere:
JJJJJJJJJJ
- Is the oldest receiver name that WebSphere MQ still needs.
LLLLLLLLLL
- Is the journal receiver library name.
YYYY
- Is the year of the oldest journal entry that WebSphere MQ needs.
MM
- Is the month of the oldest journal entry that WebSphere MQ needs.
DD
- Is the day of the oldest journal entry that WebSphere MQ needs.
HH
- Is the hour of the oldest journal entry that WebSphere MQ needs.
SS
- Is the seconds of the oldest journal entry that WebSphere MQ needs.
mmm
- Is the milliseconds of the oldest journal entry that WebSphere MQ needs.
When the oldest journal receiver has been deleted from the system, this user space contains asterisks (*) for the journal receiver name.
Note:Periodically performingRCDMQMIMG OBJ(*ALL) OBJTYPE(*ALL) DSPJRNDTA(*YES) can save startup time for WebSphere MQ and reduce the number of local journal receivers we need to save and restore for recovery.
WebSphere MQ for iSeries does not refer to the journal receivers unless it is performing a recovery pass either for startup, or for recreating an object. If it finds that a journal it requires is not present, it issues message
AMQ7432 to the queue manager message queue (QMQMMSG), reporting the time and date of the journal entry it requires to complete the recovery pass.
If this happens, restore all journal receivers that were detached after this date from the backup, in order to allow the recovery pass to succeed.
Keep the journal receiver that contains the startup entry, and any subsequent journal receivers, available in the queue manager library.
Keep the journal receiver containing the oldest
Media Recovery Entry, and any subsequent journal receivers, available at all times, and either present in the queue manager library or backed-up.
When you force a checkpoint:
- If the journal receiver named in AMQ7460 is not advanced, this indicates that there is an incomplete unit of work that needs to be committed or rolled back.
- If the journal receiver named in AMQ7462 is not advanced, this indicates that there are one or more damaged objects.