Why Does the "imqcmd list dst" Command Show Different Numbers of Messages on the Same Destination Depending On Which Clustered Broker it Connects To? (Doc ID 1300269.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle GlassFish Server - Version: 7.0 to 3.1 - Release: 7.0 to 3.1
Information in this document applies to any platform.

Goal

This article will explain why querying the number of messages using "imqcmd list dst" can show different totals for the same destination, depending on which clustered broker instance the command is run against.

Take, for example, a setup of two Message Queue (MQ) brokers that form an enhanced GlassFish Message Queue broker cluster, where the brokers use a common database store for their messages.  In this system there there are MQ clients connected to both or either MQ brokers, producing and consuming messages.

When "imqcmd list dst" is used to query the number of messages for each destination on the brokers, the following output is typical:

Broker 1: mybroker1:7676:
--------------------------------------------------------------------------------------------
   Name     Type    State      Producers        Consumers                  Msgs             
                            Total  Wildcard  Total  Wildcard  Count  Remote  UnAck  Avg Size
--------------------------------------------------------------------------------------------
queue2      Queue  RUNNING  0      -         0      -         1      0       0      152.0
queue       Queue  RUNNING  0      -         1      -         0      0       0      0.0

Broker 2: mybroker2:7676:

--------------------------------------------------------------------------------------------
   Name     Type    State      Producers        Consumers                  Msgs             
                            Total  Wildcard  Total  Wildcard  Count  Remote  UnAck  Avg Size
--------------------------------------------------------------------------------------------
queue2      Queue  RUNNING  0      -         0      -         2      0       0      152.0
queue       Queue  RUNNING  0      -         1      -         0      0       0      0.0]

with the following MQ configuration
Cluster ID mqcluster
Cluster is Highly Available true
Cluster Broker List (active) mq://mybroker1:7676/,mq://mybroker2:7676/
Cluster Broker List (configured) mq://mybroker1:7676/,mq://mybroker2:7676/
Cluster Master Broker

Notice that both Broker 1 and Broker 2 have different number of messages on one of their queues, Broker 1 reports one message on queue2, while Broker 2 reports two messages on queue2.
Legend:
  • Name shows the name of the topic/queue destination name.
  • Wildcard provides the number of wildcard "producer/consumer" this destination has
  • "Msgs Count" provides the total message in this BROKER (seen or known).
  • "Msgs Remote" provides how many of these messages are non local to this broker.
  • "Msgs Unack" means the the number of unacknowledged messages in this destination that have yet to be acknowledged from the client.
  • "Msgs Avg Size" provides the average size of the messages processed by this destination.

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms