Ensuring SQM Reader Reads All Commands in Cache

Ensure the SQM reader always reads all commands from the stable queue manager cache.

Prerequisites
Use sqm_cache_enable to enable the stable queue manager (SQM) cache before you enable sqm_reader_first.
Task

The SQM cache reduces processing time since each read process does not require unpacking because the SQM cache caches commands written to the inbound and outbound queues. To ensure that commands that are not yet read are not discarded if the cache is going to be full and to ensure the SQM reader always obtains all commands in the cache, set sqm_reader_first on. Setting the parameter on also prevents the SQM writer from writing to the cache when the cache is full, and only allows the SQM writer to write to the cache when space is made available after the SQM reader catches up and reads commands from the cache.

You can set sqm_reader_first on either at the queue level for either the inbound or outbound queues or at the server level for all queues. The default is off.

  1. Ensure the SQM reader always reads all commands in the SQM cache.
    For example, to enable sqm_reader_first
    • For a single queue, enter:
      alter queue, q_number, q_type,
      set “sqm_reader_first” to “on”
      
    • At the server level for all queues, enter:
      configure replication server
      set sqm_reader_first to "on"
  2. Restart the queue with resume queue if you set sqm_reader_first at the queue level.
    Restart SAP Replication Server if you set sqm_reader_first at the server level.