imqadmin: No. of messages not displayed correctly in durable subs screen
This question applies to the standalone platform edition of Message Queue v3.5 SP2 running on solaris.
I have a number of durable subscribers connecting to a topic. Each & all subscriber have a selector set to filter the data.
From imqadmin I can select the topic and bring up the broker destination properties. If I happen to have messages that have not been consumed (I halt my consumer code to test this), the count on the "basic" screen shows the current and correct number of messages waiting.
If I drill down and go to the Durable Subscriptions screen, the number of messages for the durable subscriber with the relevant selector is always 0... and doesn't seem to reflect that there are messages that haven't been consumed. (Even though my code does see the data come in when I reconnect the consumer).
Is this a bug in the imqadmin display or is there a reason why it can't display the message count correctly at the durable sub screen for consumers with a selector set?
[1023 byte] By [
jbeech] at [2007-11-25 18:21:58]

# 1
My guess is you are running into bug 4985446
"list dur shows 0 msgs before an active client is attached"
The bug is caused because doesnt load a destination until
an active producer or consumer attaches to it.
Until then, the messages havent been processed (so it
doesnt know how many message are targeted for a
specific durable)
To verify that this is the bug you are seeing, run a test
client that creates a producer on the destinaiton (but doesnt
see any messages) .. after the producer attaches, the # of
messages for a durable should be correct
If you think that you are running into a different issue, please
let me know
# 2
I don't think I'm seeing the same bug... in my app the producer and consumer are both active.
Relevant information for this test:
1) My producer and consumer are both active at the same time.
2) My consumer is using a transacted session and it is also consuming messages synchronously
3) I produce 250 messages and send them to my destination (a topic)
4) For this test I force the consumer to fail on its handling of the data. Say it was trying to handle 50 messages - it rollsback the session and tries again. Therefore leaving 250 messages still in the topic.
The result is that when I display the destination properties screen using imqadmin:
1) The current number of messages count is displayed correctly as 250.
2) However, the count for the durable subscriber with the correct selector is still showing 0.
Once I allow the consumer to resume its work, all 250 messages are handled correctly by that consumer only and the count (in 1) is shown as 0.
So the producer, consumer process works fine but the imqadmin gui seems a little confused.
# 3
Thanks for the info ...Let me try and duplicate the issue here and see if I seethe same behavior(I'll get back to you when I know more)
# 4
sorry for the delay in responding (its been a crazy week)
I was not able to duplicate imqadmin showing 0 messages
for the durable (the tool reflected current values)
However, I noticed that the panel does not periodically
update its values (it reflects the the state at the point it
was brought up), so to get updated information, you need to:
- close the properties page
- select the destination
- bring up the properties page
- look at the durable subscriber information
Could this be causing the problem (if so, I'll file a bug that
the totals should periodically update)
If not, do you have a small test case which I can use
to duplicate the issues ?
If you do, please send it to imq-feedback@sun.com
Thanks
Linda
# 5
I tried refreshing the properties page but that doesn't help. But I did retest and what might have not been clear in my statement of the problem is that I repeatedly rollback the transaction.. and then try again over and over. This continues during the test.
If I quit the application and kill the consumer, the total then shows up fine in the Durable Subscriptions page (250 to match the 250 shown in the basic page). If I rerun my consumer (running in the fail and loop mode) the total always shows as 0..
I am only handling a portion of the messages in the transaction (say 50 of the 250) before rolling back... so there should always be some message count left (even mid transaction). It would make more sense to show 200 (even 250) instead of 0?
So It's my guess that the imqadmin tool cannot give an accurate count and returns 0. Once I stop my consumer it is able to give an accurate count and displays the correct value.
Does this help?