| Previous | Next |
| MQ_ERROR_NOT_A_CORRECT_OBJECT_CLASS | MQ_ERROR_GC_NEEDED |
MQ_ERROR_MULTI_SORT_KEYS
Operational meaning
Applications should keep MQ_ERROR_MULTI_SORT_KEYS attached to the exact MSMQ call that produced it; translating it immediately to “queue error” discards the diagnostic boundary. In this case the decisive subject is AD DS locator accepts only one sort key. A structurally valid multi-column sort set exceeds the directory-backed implementation’s capability.
For MQ_ERROR_MULTI_SORT_KEYS, MQLocateBegin searches public queues registered in the directory; it does not enumerate arbitrary private queues. When diagnosing MQ_ERROR_MULTI_SORT_KEYS, its restriction, projection, and sort structures are translated into a directory-backed query.
When diagnosing MQ_ERROR_MULTI_SORT_KEYS, public-queue discovery depends on both valid MSMQ query structures and AD DS behavior. In the MQ_ERROR_MULTI_SORT_KEYS path, A malformed MQSORTSET should be separated from LDAP bind, schema, replication, or permissions failures.
Where to draw the boundary
| Subsystem | MQLocateBegin directory queries over public-queue metadata |
|---|---|
| Decisive boundary | query restrictions, selected columns, and sort keys must be valid for the AD DS-backed locator |
| Code-specific focus | AD DS locator accepts only one sort key |
| Primary recovery rule | Select one server-side key and perform secondary ordering in the application. |
When diagnosing MQ_ERROR_MULTI_SORT_KEYS, separate a malformed query structure from an AD DS availability error. In the MQ_ERROR_MULTI_SORT_KEYS path, repeating the same invalid MQSORTSET or MQRESTRICTION against another domain controller will not repair it. For MQ_ERROR_MULTI_SORT_KEYS, the code-specific boundary is AD DS locator accepts only one sort key.
Evidence to preserve
- Mqrestriction, mqcolumns, and mqsortset as submitted; associate it explicitly with
MQ_ERROR_MULTI_SORT_KEYS. - When diagnosing
MQ_ERROR_MULTI_SORT_KEYS, the ad ds mode and domain identity of the caller; capture the value before cleanup or retry changes it. - In the
MQ_ERROR_MULTI_SORT_KEYSpath, the exact property used for filtering, projection, or ordering; compare it with a known-good call using the same account and queue type. - For this
MQ_ERROR_MULTI_SORT_KEYSresult, record the queue path or format name, local/remote placement, transactional flag, caller SID, process build, and UTC correlation ID when they apply.
For MQ_ERROR_MULTI_SORT_KEYS, log certificate thumbprints, provider names, SIDs, GUIDs, lengths, and hashes where useful, but do not log private keys, symmetric keys, credentials, or confidential message bodies.
Diagnostic sequence
- Record the unsigned HRESULT,
MQ_ERROR_MULTI_SORT_KEYS, and the native API or COM method before a framework replaces it with a generic exception. - Reproduce with the smallest queue/message/property set that still returns
MQ_ERROR_MULTI_SORT_KEYS; change one precondition at a time. - In the
MQ_ERROR_MULTI_SORT_KEYSpath, verify the postcondition after the failed call: queue existence, message presence, directory object state, transaction outcome, or generated output may differ by result. - For this
MQ_ERROR_MULTI_SORT_KEYSresult, capture the exact property used for filtering, projection, or ordering. - Capture MQRESTRICTION, MQCOLUMNS, and MQSORTSET as submitted.
- When diagnosing
MQ_ERROR_MULTI_SORT_KEYS, apply the code-specific recovery rule: Select one server-side key and perform secondary ordering in the application.
Handling and recovery
Select one server-side key and perform secondary ordering in the application.
When diagnosing MQ_ERROR_MULTI_SORT_KEYS, retry only after a measurable state change: corrected property data, resized storage, restored service/directory reachability, recreated handle, completed transaction recovery, or repaired certificate access. In the MQ_ERROR_MULTI_SORT_KEYS path, bound attempts and keep an idempotency key for sends or directory mutations.
Nearby failure boundaries
A directory query shape error is deterministic. For this MQ_ERROR_MULTI_SORT_KEYS result, switching domain controllers cannot make an unsupported column, relation, or sort key valid. The specific focus for MQ_ERROR_MULTI_SORT_KEYS remains AD DS locator accepts only one sort key.
- In the
MQ_ERROR_MULTI_SORT_KEYSpath, restarting MSMQ before collecting evidence can invalidate handles and erase the first useful event; it is a containment action, not a root-cause diagnosis. - For this
MQ_ERROR_MULTI_SORT_KEYSresult, granting broad queue or certificate permissions may mask the symptom while creating a security defect. ForMQ_ERROR_MULTI_SORT_KEYS, test the exact identity and access needed by the operation.
Worked example
A discovery service querying public queues encounters MQ_ERROR_MULTI_SORT_KEYS. For MQ_ERROR_MULTI_SORT_KEYS, it captures the restriction/column/sort structures and validates the query before testing directory availability. When diagnosing MQ_ERROR_MULTI_SORT_KEYS, the acceptance test then changes only the decisive precondition and confirms both the HRESULT and the actual queue/message state.
Automated coverage should preserve the original arrays/identities, confirm that cleanup is safe after MQ_ERROR_MULTI_SORT_KEYS, and test that a retry does not duplicate messages or directory objects.
References
- Microsoft: Message Queuing error and information codes — source used for the
MQ_ERROR_MULTI_SORT_KEYSanalysis. - Microsoft: MQLocateBegin — source used for the
MQ_ERROR_MULTI_SORT_KEYSanalysis. - Microsoft Open Specifications: MSMQ and directory services — source used for the
MQ_ERROR_MULTI_SORT_KEYSanalysis. - IETF RFC 4511: LDAP protocol — source used for the
MQ_ERROR_MULTI_SORT_KEYSanalysis.
Looking for a different code? Search another status or error code.