You can use JMX (via JConsole, for example) to get stats on any destination in the broker, which would let you find out whether there were any messages pending in any of your queues.
Also, were there any old messages in any destination (including your Dead Letter Queue) at the time you did the switchover? If you're using ActiveMQ 5.11.0 or before and if you're using KahaDB for your master/slave persistence store, and if there were messages in the DLQ or in any other destination that hadn't been consumed, there's a bug ( https://issues.apache.org/jira/browse/AMQ-5542) that's fixed in 5.11.1 and 5.12.0 that could cause messages to be redelivered after a master/slave failover. That's a shot in the dark and might not apply to your situation, but it would produce the behavior you're observing. On Thu, Mar 5, 2015 at 2:31 AM, suganya <suganya....@gmail.com> wrote: > We are developing a product which carries out all the transaction in > activeMQ > . > > we have q1 & q2 hosted in a broker and q3 in two brokers(Master/Slave > configuration). > Our product reads messages from q1 broker b1 and populates the same in q3 > broker 2 .Now after some of the messages are enqueued into q3 ,broker b2 is > stopped and so broker 3 starts eventually. > Upon restart the message counts are reset to 0 . Our product also reads > messages from q3 and populates it to q2 of broker b1. Now there is a > discrepancy observed in the message count. > The number of messages in enqueued in q1 is less than the number of > messages > enqueued in q2. > > Now We are populating only the messages that we receive from q1 into q3 > after processing it through q3. > > Is it possible that before starting b1,there might have been some pending > messages in q3 that would have populated q2 after starting our > product.Hence > the counter was 0 initially for both q1 and q2 in broker 2 but after > starting q3 is high? > > > Are we missing something here to monitor,if so please advice us on how to > take it forward? > > > > -- > View this message in context: > http://activemq.2283324.n4.nabble.com/Discrepancy-in-message-counts-tp4692509.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. >