MQRC 2047: Persistence value not valid
MQRC 2047 means MQMD.Persistence contains an invalid value. Initialize the descriptor and use a supported persistence constant before putting.
Other names for this code
Also written as RC2047, reason code 2047, MQ error 2047, MQRC_PERSISTENCE_ERROR, 07FF, 0x07FF.
What it means
MQPUT or MQPUT1 rejected the Persistence field in MQMD. IBM specifies persistent, nonpersistent or queue-default persistence as the supported choices. The reason is about the field value, not whether the queue has enough storage.
A valid persistence value can still be unsuitable for a particular destination. That different case can produce MQRC 2048, particularly with temporary dynamic queues.
A troubleshooting example
A settings page stores persistence as the words durable and transient. A wrapper expects an MQ integer, but a failed conversion leaves an unsupported value in MQMD. Reason 2047 then appears as a production send failure. Map each supported application setting explicitly to the correct MQ constant and reject unknown settings at startup. Test the default path as well: a missing setting should produce a deliberate policy choice, not uninitialized storage or a silent change in delivery durability.
Common causes
- An uninitialized descriptor leaves an arbitrary integer in Persistence.
- A configuration string or application enum is passed directly instead of being mapped to an MQ constant.
- A native structure declaration or buffer overwrite corrupts the field before MQPUT.
How to find the problem
- Log MQMD.Persistence immediately before the put. Compare the value with the constants supplied by the deployed MQ library.
- Trace how configuration is mapped to that field. Check blank input, default branches and numeric conversion errors.
- Initialize a fresh descriptor and repeat a small test. If that succeeds, compare every later assignment with the failing path.
- If other descriptor fields also look wrong, investigate the MQMD layout and memory ownership rather than fixing one integer in isolation.
How to fix it
- Set MQPER_
PERSISTENT, MQPER_ NOT_ PERSISTENT or MQPER_ PERSISTENCE_ AS_ Q_ DEF according to the approved message contract. - Validate configuration at startup and reject unsupported values with a clear application error before reaching MQ.
- Keep persistence policy separate from incidental UI labels or language enums. Test the resulting descriptor for every supported configuration choice.
What it looks like
Illustrative diagnostic notes; not an IBM message template. MQPUT Reason=2047 Inspect MQMD.Persistence Use MQPER_PERSISTENT, MQPER_NOT_PERSISTENT or MQPER_PERSISTENCE_AS_Q_DEF as designed.
IBM documentation
IBM MQ 9.4: 2047 MQRC_PERSISTENCE_ERROR. Use the documentation for your installed release.
Related codes
Questions
Is 2047 caused by a full disk?
No. It identifies an invalid persistence field value. Storage shortages have different reason codes.
Should I always use persistent messages?
Choose according to the delivery and recovery requirements of the application. Correcting an invalid field does not decide the business durability policy.