IBM MQ reason code

MQRC 2057: Queue type error

MQRC 2057 means an MQ operation used an unsuitable queue type. Check model queues, actual dynamic reply names and queue-manager alias resolution.

Other names for this code

Also written as RC2057, reason code 2057, MQ error 2057, MQRC_Q_TYPE_ERROR, 0809, 0x0809.

What it means

A model queue is a template for creating a dynamic queue, not a general destination for puts or replies. IBM documents MQPUT1 against a model queue and replies addressed to a model name among the causes of 2057.

Other cases involve queue-manager aliases resolving back to the local manager and dynamic-queue creation under specific automatic-reconnection policies. Preserve the call and routing context to distinguish them.

A troubleshooting example

A requester opens a model to create a private reply queue, but sends the model name in ReplyToQ. The server attempts delivery and the reply cannot reach the intended queue. Trace the returned dynamic name through the requester's code into the descriptor. A test should use a generated name, delay the response and verify that the same requester receives it. Hard-coding a name for testing can hide exactly the propagation defect that caused the production incident.

Common causes

  • An application uses MQPUT1 directly against the model queue rather than opening it to create a dynamic queue.
  • ReplyToQ contains the model's name instead of the generated reply queue name.
  • Queue-manager alias or reconnection behavior leads to a queue type the requested operation cannot use.

How to find the problem

  1. Record the failing API and the MQOD ObjectName and ObjectQMgrName fields. For a reply failure, inspect the original request's ReplyToQ.
  2. Display the target definition to distinguish local, model, remote and alias types. Follow queue-manager aliases to the effective manager.
  3. For dynamically created replies, compare the name returned by MQOPEN with the name placed into the request descriptor.
  4. If using a uniform cluster or automatic reconnect, check the relevant dynamic-queue policy with the administrator and the installed IBM reference.

How to fix it

  • Create a dynamic queue through the model using the supported open flow, then use the actual generated destination name.
  • Correct the request's reply address and test the full reply path. Do not replace model queues with arbitrary shared queues just to remove the error.
  • Repair alias or reconnection configuration where it creates the documented mismatch. Test reconnection separately from normal startup.

What it looks like

Illustrative diagnostic notes; not an IBM message template.
Model used to create: APP.REPLY.MODEL
Actual queue returned: generated dynamic name
ReplyToQ must contain the actual destination, not the model.

IBM documentation

IBM MQ 9.4: 2057 MQRC_Q_TYPE_ERROR. Use the documentation for your installed release.

Report a correction to WND Software.

Questions

Can I put directly to a model queue?

Use the model to create a suitable dynamic queue, then address the real queue. A model is a creation template.

Why can 2057 appear in dead-letter information?

A server or channel can encounter the bad reply destination later. Inspect the reason in the dead-letter header and trace the original reply address.