Message channel agents move application payloads across TCP (or other TRPTYPE) links in protocol buffers. IBM MQ allows optional receive exits—programs named in the RCVEXIT channel attribute that inspect or modify those buffers on the inbound path before the queue manager treats them as ordinary MQ messages. Compression appliances, legacy encryption wrappers, and bespoke audit trails are historical reasons exits exist. Today many functions moved to TLS, API gateways, or application-layer encryption, but thousands of production channels still carry RCVEXIT and SENDEXIT pairs from decades-old designs. Beginners who inherit such channels must understand that blanking RCVEXIT without removing SENDEXIT on the partner breaks the link instantly. This tutorial explains RCVEXIT syntax, pairing with SENDEXIT, performance implications, differences from SCYEXIT, platform deployment, and safe troubleshooting when exits corrupt data or throttle throughput.
On a sender-receiver pair, the sending MCA calls SENDEXIT before data leaves its host; the receiving MCA calls RCVEXIT after data arrives but before messages are committed to local queues. The exits see a byte stream governed by MQ internal rules—not the same API as MQPUT from an application. Programming exits requires IBM exit interface knowledge (MQCB, exit parameters, reason codes). A receive exit that expands a buffer must allocate correctly; a wrong length causes channel protocol errors that show as sequence number or conversion failures in logs, masking the true exit bug.
| Queue manager side | Outbound attribute | Inbound attribute |
|---|---|---|
| Partner A (sender) | SENDEXIT compress | RCVEXIT (often blank on SDR) |
| Partner B (receiver) | SENDEXIT (if reply path) | RCVEXIT decompress |
| Both | SCYEXIT optional | SCYEXIT optional |
1234567DEFINE CHANNEL('PARTNER.DATA') CHLTYPE(RCVR) TRPTYPE(TCP) + RCVEXIT('myRcvExit(LEVEL=9)') DEFINE CHANNEL('PARTNER.DATA') CHLTYPE(SDR) TRPTYPE(TCP) + CONNAME('partner.host(1414)') XMITQ('PARTNER.XMIT') + SENDEXIT('mySndExit(LEVEL=9)') DISPLAY CHANNEL('PARTNER.DATA') RCVEXIT SENDEXIT ALTER CHANNEL('PARTNER.DATA') RCVEXIT('myRcvExit(LEVEL=9)')
The exit names and data strings must match what your exit vendor documents. LEVEL=9 is fictional configuration data passed into the exit initialization. After ALTER, recycle channel instances. On RCVR, inbound connections pick up the new exit on the next bind; active RUNNING channels may need STOP CHANNEL on both sides for a clean test.
Imagine SENDEXIT wraps each buffer in an envelope with a checksum; RCVEXIT verifies the checksum and removes the envelope. If Partner A adds SENDEXIT and Partner B has no RCVEXIT, Partner B tries to parse envelopes as raw MQ protocol—failure follows. Documentation for exit products always lists required attributes on both CHLTYPE(SDR) and CHLTYPE(RCVR), or SVRCONN and CLNTCONN pairs. Version mismatches between exit builds on two queue managers are as dangerous as MQ version skew—test every maintenance window.
Every buffer crosses user-mode exit code. CPU cost scales with message rate and buffer size. High-throughput payment rails measuring sub-millisecond latency often remove exits in favor of hardware encryption or TLS only. BATCHSZ and BATCHINT batch multiple messages per buffer, so exits run less often per message but handle larger chunks—profile both settings together. If CPU on the channel initiator spikes after enabling RCVEXIT, consider whether transformation belongs in the application instead.
Server connection channels can specify RCVEXIT for traffic from clients. Client connection definitions may need SENDEXIT on the workstation if the server RCVEXIT expects a transform—uncommon for beginners but seen in strict financial networks. MQIPT and similar middleware sometimes terminate TLS and apply exits at the edge, simplifying client configuration while centralizing RCVEXIT on the hub queue manager.
SENDEXIT is the machine that shrink-wraps each box before the truck leaves. RCVEXIT is the machine at the receiving dock that removes the shrink wrap before boxes enter the warehouse. If you turn off the unwrap machine but trucks still deliver wrapped boxes, nothing can be shelved.
RCVEXIT is a helper that changes each package right when it arrives, before MQ puts it on the shelf—like opening a locked case with a special key your site invented.
Document a channel pair showing which side has SENDEXIT vs RCVEXIT and what each exit does in one sentence.
Estimate CPU impact: 2000 msg/sec, 4 KB average, exit adds 0.1 ms per call—when is this a problem?
Write a rollback plan if a new RCVEXIT build fails during production deployment.
1. RCVEXIT processes data:
2. Partner SENDEXIT usually needs:
3. RCVEXIT vs SCYEXIT:
4. Blank RCVEXIT means: