Consumers hang trying to deque messages

View: New views
7 Messages — Rating Filter:   Alert me  

Consumers hang trying to deque messages

by jchang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

My consumers are not pulling messages off the queue.  The message producers are sending to a composite queue, and then pulling from the physical queue.  I *AM* using the swiftmq spring support.

It seems similar to what is being discussed toward the end of this thread:
http://www.nabble.com/SwiftMQ-7.4.1-%2B-spring-2.5-%2B-transactions-%2B-ReplyTo-%3D%3D-trouble-td23027339.html
(See message at May 12, 2009; 09:32am)
This thread says the problem will go away if you use the spring support, which I am already using.

Doing a jstack, I see that the conumer is hung up here:
"DefaultMessageListenerContainer-1" prio=10 tid=0x00002aaad8ac2800 nid=0x17f8 in Object.wait() [0x0000000041b43000..0x0000000041b43c20]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(Native Method)
        - waiting on <0x00002aaacf7f8b08> (a com.swiftmq.jms.v750.QueueReceiverImpl)
        at com.swiftmq.tools.util.UninterruptableWaiter.doWait(Unknown Source)
        at com.swiftmq.jms.v750.MessageConsumerImpl.receiveMessage(Unknown Source)
        - locked <0x00002aaacf7f8b08> (a com.swiftmq.jms.v750.QueueReceiverImpl)
        at com.swiftmq.jms.v750.MessageConsumerImpl.receive(Unknown Source)
        at com.swiftmq.jms.springsupport.PooledConsumer.receive(Unknown Source)
        at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveMessage(AbstractPollingMessageListenerContainer.java:405)
        at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:308)
        at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)
        at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:982)
        at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:974)
        at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:876)
        at java.lang.Thread.run(Thread.java:619)

Re: Consumers hang trying to deque messages

by jchang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have found that if the message consumer sends straight to the physical queue, it all works fine.  However, we need to use the composite queue, so this is not a viable solution.

Also, we are configuring the destroy method in the Spring, BTW (which is discussed in the other thread linked above).

Re: Consumers hang trying to deque messages

by IIT Software :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

The problem is certainly not our springsupport if it works with a non-composite queue.

Since composite queues work fine, it seems to be a kind of configuration problem on your side. May be the messages don't arrive at the phys. queue where you listen on. You might check that with Explorer.

Re: Consumers hang trying to deque messages

by jchang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

They arrive there, I've checked.  I see the messages sitting in the physical queue looking in the explorer.  This happens no matter what I set the message timout to (-1 all the way up to minutes long).

Re: Consumers hang trying to deque messages

by IIT Software :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If the messages are in the queue, are they locked or not? May be you're listening on a wrong queue?

If you switch "smart tree" off (under "Router Environment"), save and reboot the router, you can see under JMS Swiftlet/Usage as well as under Queue Manager Swiftlet/Usage on which queue the client has a receiver.

Re: Consumers hang trying to deque messages

by jchang :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

They show as locked.  I have double checked that I am listening on the correct queue.  

Also, because they are locked, my understanding is that they are already delivered into a specific consumer's cache, which would indicate that I am listening on the correct queue.  Correct?

Re: Consumers hang trying to deque messages

by IIT Software :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

There could also be another consumer on that queue locking the messages or the connection has not been started.

Did you check with smart tree disabled as mentioned in a prev post?