Site icon EfmSoft

What does HRESULT 0xC00E005A (MQ_ERROR_QUEUE_DELETED) mean?

 
Previous Next
MQ_ERROR_TRANSACTION_ENLIST MQ_ERROR_ILLEGAL_CONTEXT

MQ_ERROR_QUEUE_DELETED

Operational meaning

The important part of MQ_ERROR_QUEUE_DELETED is not only whether the call failed, but which MSMQ subsystem had enough information to return this specific result. Interpret it as open handle refers to a queue that has been deleted, not as a general transport outage. Recreating a queue with the same path does not make the old handle valid.

Reopening by the same path after deletion can identify a new queue object. When diagnosing this result, the application must decide whether resuming against that new object is safe or whether the work item belongs to the old generation.

When diagnosing this result, for asynchronous or transactional reads, cleanup must be coordinated with callback and transaction owners., closing a handle from another thread can be the cause rather than the cure.

Where to draw the boundary

Subsystemqueue and handle lifetime across deletion, service restart, asynchronous reads, and competing consumers
Decisive boundaryan object that was valid when opened may no longer identify the same queue-manager generation or message
Code-specific focusopen handle refers to a queue that has been deleted
Primary recovery ruleClose it, resolve the intended new queue, and reopen explicitly.

When diagnosing this result, the same pathname does not prove object identity across restart or recreation., handles and message lookup IDs belong to a particular lifetime. The code-specific boundary is open handle refers to a queue that has been deleted.

Evidence to preserve

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

  1. Record the unsigned HRESULT, it, and the native API or COM method before a framework replaces it with a generic exception.
  2. In the path, verify the postcondition after the failed call: queue existence, message presence, directory object state, transaction outcome, or generated output may differ by result.
  3. capture handle creation time and MSMQ service restart time.
  4. capture queue deletion/recreation events and current format name.
  5. When diagnosing it, apply the code-specific recovery rule: Close it, resolve the intended new queue, and reopen explicitly.

Handling and recovery

Close it, resolve the intended new queue, and reopen explicitly.

When diagnosing it, the retry decision must account for side effects that may already exist., query queue, message, directory, or transaction state first whenever the result leaves completion uncertain.

Nearby failure boundaries

In the path, reusing the same pathname after restart or recreation does not revive the old handle, lookup identifier, message lock, or transaction context. The specific focus for it remains open handle refers to a queue that has been deleted.

Worked example

A long-running consumer encounters it. It closes invalid objects, resolves the current queue generation, and reconciles whether another consumer completed the work.

A regression test should force it, assert the raw value and relevant outputs, then correct only the documented precondition and verify the intended success or neighboring HRESULT.

References


Looking for a different code? Search another status or error code.

Exit mobile version