DEFBIND

DEFBIND (default bind) is a cluster queue attribute that tells IBM MQ how to choose which physical queue instance receives your messages when several queue managers in a cluster all advertise the same cluster queue name. Without understanding DEFBIND, teams see “messages jumping” between servers, broken message groups, or uneven load. This page explains DEFBIND(NOTFIXED), DEFBIND(OPEN), and DEFBIND(GROUP), how they map to MQOPEN options like MQOO_BIND_NOT_FIXED and MQOO_BIND_ON_OPEN, when to pick each value, and how DEFBIND interacts with cluster workload management and CLWLUSEQ—written for beginners configuring their first cluster application queue.

Why Cluster Queues Need Binding

A cluster queue name such as ORDERS.CLUSTER is a logical name. Multiple queue managers may each host a QLOCAL with CLUSTER('PAYMENTS') exposing that name. When an application puts a message, the queue manager must pick one instance—or spread puts according to rules. DEFBIND is the default rule used when the application opens the queue with MQOO_BIND_AS_Q_DEF (use the queue definition default). Binding affects ordering, affinity to a consumer on one host, and how aggressively workload balancing runs.

DEFBIND values in MQSC
DEFBINDBehaviorChoose when
NOTFIXEDDestination can change per MQPUTMaximum parallelism; order across cluster not required
OPENAll puts on one open go to same instance until closeStickiness for session; order while handle open
GROUPAll messages in a group go to same instanceGrouped MQPUT must stay together

DEFBIND(NOTFIXED)

NOTFIXED is the loosest binding. Each message put may be routed to a different cluster queue instance based on the cluster workload algorithm (channel state, weights, CLWLUSEQ, and queue manager priorities). Throughput scales across the cluster. Downside: two messages from the same producer may be processed on different servers in different order relative to each other. Do not use NOTFIXED alone when business logic assumes a single FIFO pipe unless consumers coordinate externally.

DEFBIND(OPEN)

OPEN binds at MQOPEN time. The first put after open selects (or is assigned) an instance, and subsequent puts on that queue handle go to the same instance until MQCLOSE. If the application disconnects and opens again, a different instance may be chosen—design reconnect logic accordingly. OPEN suits “process everything I send in this connection on one node” patterns, including some legacy programs that open once and loop put/get.

DEFBIND(GROUP)

When applications use message groups (MQMFMD fields for grouping), the cluster must not split a group across instances. GROUP ensures all messages in the group share one destination. Combine with correct MQOPEN options documented for your API (for example MQOO_BIND_ON_GROUP). Mixed DEFBIND across cluster members breaks group delivery—standardize in MQSC templates for all hosts publishing the cluster queue.

MQOPEN Options vs DEFBIND

Applications can override the queue default: MQOO_BIND_NOT_FIXED, MQOO_BIND_ON_OPEN, MQOO_BIND_ON_GROUP, or MQOO_BIND_AS_Q_DEF to honor DEFBIND. Explicit options win over defaults when set. Code reviews should flag hard-coded bind flags that fight the queue definition—operations changes DEFBIND in MQSC but behavior unchanged because Java client passes BIND_ON_OPEN always. Document the intended binding in both MQSC and developer guides.

shell
1
2
3
4
5
DEFINE QLOCAL('ORDERS.CLUSTER') REPLACE CLUSTER('PAYMENTS') + DEFBIND(NOTFIXED) CLWLUSEQ(ANY) MAXDEPTH(500000) * Order-sensitive consumer on one node: ALTER QLOCAL('ORDERS.CLUSTER') DEFBIND(OPEN) DISPLAY QLOCAL('ORDERS.CLUSTER') DEFBIND CLUSTER

DEFBIND and Message Ordering

FIFO order is guaranteed on one queue instance, not across the whole cluster name. NOTFIXED spreads messages—global order is lost. OPEN preserves order among messages put on one open handle to one instance. If you need strict global sequence, use a single instance (CLWLUSEQ LOCAL on one hub) or external sequencing keys, not NOTFIXED on a wide cluster. See the message ordering tutorial for syncpoint and priority interactions.

Consistency Across Cluster Members

  • Export QLOCAL definitions from all members; diff DEFBIND.
  • Promotion scripts ALTER all instances in one change ticket.
  • Test failover: stop one QM, verify puts still succeed with expected binding.
  • For GROUP, run grouped put integration test on two-node cluster minimum.

Explain Like I'm Five: DEFBIND

Three stores share one sign “Toy Drop Box.” NOTFIXED means each toy you drop might go to a different store. OPEN means the first toy picks a store and all your toys that day go to that same store until you go home. GROUP means a bag of toys tied together always goes to the same store.

Practice Exercises

Exercise 1

High-volume order processing with no ordering requirement—which DEFBIND and why?

Exercise 2

Application opens queue once per batch file and must not split puts across servers—which DEFBIND?

Exercise 3

After ALTER DEFBIND on one cluster member only, what symptom might testers see?

Frequently Asked Questions

Frequently Asked Questions

Test Your Knowledge

Test Your Knowledge

1. DEFBIND(NOTFIXED) allows:

  • Different cluster instances per put
  • Only one QM forever
  • XMITQ routing
  • DLQ only

2. DEFBIND(OPEN) fixes destination until:

  • Queue is closed and reopened
  • Midnight
  • Channel stop
  • DLQ depth 1

3. Message groups in clusters often need:

  • DEFBIND(GROUP) or OPEN with group open options
  • USAGE(XMITQ)
  • DISTL(NO) only
  • BOTHRESH(0)

4. Applications can override DEFBIND with:

  • MQOPEN bind options
  • ALTER CHANNEL only
  • PURGE QLOCAL
  • STOP QMGR
Published
Read time14 min
AuthorMainframeMaster
Verified: IBM MQ 9.3 documentation