BATCHINT (Batch Interval)

BATCHSZ alone would let a channel wait forever for enough messages to fill a batch on a quiet route—the last urgent message would sit behind an unfilled batch count. BATCHINT fixes that by starting a timer: when the interval in milliseconds expires, the channel sends whatever messages it has collected, even if the batch is smaller than BATCHSZ. Together, BATCHSZ and BATCHINT define the throughput-versus-latency curve for message channels. This tutorial explains BATCHINT in detail, how partial batches behave under load, how to ALTER channel definitions safely, and how to interpret symptoms when BATCHINT is zero or extremely high on production links.

The Two Limits Working Together

Imagine BATCHSZ(50) and BATCHINT(200). Under heavy load, the agent fills fifty messages quickly and sends—BATCHINT rarely matters. Under light load, three messages arrive and nothing else for 200 ms; the timer fires and those three leave. Under bursty load, you see a mix: full batches during peaks, timer-driven partial batches during valleys. Tuning is finding the compromise your business accepts between wire efficiency and maximum wait time per message.

Example BATCHINT scenarios (illustrative)
BATCHINTBATCHSZTypical behavior
5010Low latency; small batches
500100Balanced WAN default starting point
5000500Bulk; last msg may wait seconds

Defining BATCHINT in MQSC

shell
1
2
3
4
5
6
7
8
DEFINE CHANNEL('BULK.TO.HUB') CHLTYPE(SDR) TRPTYPE(TCP) + CONNAME('hub.corp(1414)') XMITQ('XMIT.HUB') + BATCHSZ(200) BATCHINT(1000) DEFINE CHANNEL('REALTIME.TO.HUB') CHLTYPE(SDR) TRPTYPE(TCP) + CONNAME('hub.corp(1414)') XMITQ('XMIT.RT') + BATCHSZ(20) BATCHINT(50) ALTER CHANNEL('BULK.TO.HUB') CHLTYPE(SDR) BATCHINT(500) DISPLAY CHANNEL('BULK.TO.HUB') BATCHSZ BATCHINT

REALTIME route flushes within about 50 ms if the batch is not full—good for interactive traffic. BULK route waits up to about one second to gather up to 200 messages—good for overnight files. Alter one route at a time; document before/after in change records. Receiver and cluster channel definitions should carry compatible values.

Explainer: Egg Timer on the Packing Line

Workers fill a box up to fifty items (BATCHSZ). If the egg timer rings (BATCHINT) and the box still has only three items, they tape the box shut and ship it anyway so item number three is not waiting for forty-seven more that might not come today.

Latency Percentiles and BATCHINT

Application teams track p95 and p99 latency. Raising BATCHINT raises the worst-case wait for the last message in a partial batch. If p99 must stay under 200 ms end-to-end, BATCHINT near 5000 on the channel segment alone may violate SLA before application logic runs. Measure with realistic message sizes and persistence—non-persistent test traffic misleads tuning decisions.

BATCHINT at Extremes

  • Very low BATCHINT (1–10)—near message-by-message send; high CPU and round-trip cost on WAN.
  • Very high BATCHINT—messages wait on XMITQ during lulls; CURDEPTH drops in lumps when timer fires.
  • Zero—consult IBM documentation for your release; may mean default or special handling; verify in lab before production.

Monitoring Partial Batch Behavior

DISPLAY CHSTATUS MSGS and BYTS over intervals during low traffic. If MSGS increments in single-message steps, BATCHINT may be dominating. During peaks, MSGS may jump in larger steps aligned with BATCHSZ. Compare channels with identical message rates but different BATCHINT to prove timer impact in test.

Common Mistakes

  1. Copying bulk BATCHINT to real-time channels during template deployment.
  2. Tuning BATCHINT without BATCHSZ—unbalanced pair.
  3. Expecting BATCHINT to fix partner listener down—use retry and network fix.
  4. Ignoring TLS CPU while chasing batch timers—profile holistically.

Explain Like I'm Five: BATCHINT

BATCHINT is the egg timer that says ship the box now even if it is not full yet.

Practice Exercises

Exercise 1

BATCHSZ 50, BATCHINT 100, steady 10 msg/s. Estimate typical batch sizes.

Exercise 2

Business needs sub-100 ms channel wait. Suggest BATCHSZ and BATCHINT starting points.

Exercise 3

Why is BATCHINT in milliseconds while HBINT is in seconds?

Frequently Asked Questions

Frequently Asked Questions

Test Your Knowledge

Test Your Knowledge

1. BATCHINT is measured in:

  • Milliseconds
  • Seconds
  • Messages
  • Megabytes

2. When BATCHINT expires with a partial batch:

  • Channel sends available messages
  • Channel deletes XMITQ
  • Listener stops
  • DLQ clears

3. BATCHINT pairs with:

  • BATCHSZ
  • MAXDEPTH only
  • CLUSQMGR only
  • INITQ

4. Lower BATCHINT usually:

  • Reduces batching wait latency
  • Disables TLS
  • Increases MAXMSGL
  • Stops retry
Published
Read time16 min
AuthorMainframeMaster
Verified: IBM MQ 9.3 documentation