Fire-and-forget is the simplest IBM MQ conversation pattern: produce a message, put it on a queue or topic, commit if using syncpoint, and move on without waiting for a business reply. The name sounds careless, but in enterprise systems it is deliberate decoupling—the order service notifies shipping, audit, and analytics without blocking on each downstream system. This page explains what fire-and-forget means at the protocol and application layers, how persistence and syncpoint still matter, error visibility when no reply exists, comparison with request/reply and pub/sub, and MQSC patterns for one-way work queues beginners see on mainframe and distributed estates.
Beginners often confuse "no reply" with "no acknowledgment." MQI put operations return completion codes; persistent messages are logged before success is reported. That is middleware acknowledgment—the queue manager has the message. Application acknowledgment—payment posted, email sent—happens later when a consumer processes the message. Fire-and-forget accepts that gap: the producer trusts MQ and downstream consumers for the rest of the lifecycle.
If the producer must know business completion, use request/reply, a separate status event on a topic, or poll a database—not blocking HTTP inside the critical path unless requirements demand it.
Avoid assuming fire-and-forget when regulatory proof requires synchronous confirmation from the downstream system. You may still use one-way MQ plus a separate correlated status message rather than blocking RPC.
One-way does not mean disposable. Payment handoff queues use DEFPSIST(YES) and syncpoint on the put. Telemetry may use non-persistent messages for speed. The fire-and-forget pattern chooses not to wait for a reply; guaranteed delivery tutorial covers how persistence and at-least-once semantics apply regardless.
| Choice | Effect | When to use |
|---|---|---|
| Persistent put + commit | Survives QM restart | Business data, settlements, orders |
| Non-persistent put | Faster; may lose on crash | Metrics, heartbeats, best-effort status |
| Syncpoint with Db2 | Atomic DB + message | Outbox alternative or dual commit |
| No syncpoint | Message visible immediately on put success | Simple lab tests; understand failure modes |
When consumers fail, messages back out or hit BOTHRESH and move to a backout queue. Unrouteable messages go to dead-letter queues (DLQ). Operations alert on DLQ depth. Producers learn of failure only if architects add failure events—for example a topic errors/payment/failed—or monitoring on queue depth and age. Designing observability up front prevents silent backlog.
One-way put to a work queue targets one consumer pool. One-way publish to a topic fans out to many subscribers. Both are fire-and-forget from the publisher perspective if no reply is expected. Choose queue versus topic based on fan-out needs, not based on whether a reply exists.
1234567DEFINE QLOCAL('NOTIFY.OUTBOX') REPLACE + DEFPSIST(YES) MAXDEPTH(500000) + DESCR('Fire-and-forget notifications') * Producer: MQPUT with no ReplyToQ, persistent, commit * Consumer: loop MQGET, process, commit or backout ALTER QLOCAL('NOTIFY.OUTBOX') BOTHRESH(3) BOQNAME('NOTIFY.BOQ') DEFINE QLOCAL('NOTIFY.BOQ') REPLACE
You drop a letter in the school suggestion box and walk away. You do not wait outside the box for someone to write back. Later, the principal reads letters and might act. If you needed an answer before going to recess, you would use request/reply instead—wait at your tray for a response note.
Classify fire-and-forget vs request/reply: balance inquiry, audit log entry, credit limit check for checkout.
List three ways producers can learn that consumers failed without using ReplyToQ.
1. Fire-and-forget implies:
2. After a successful persistent put and commit, the producer knows:
3. A status email trigger is typically:
4. Poison message handling for fire-and-forget consumers uses: