Author |
Message
|
mythinky |
Posted: Thu Dec 13, 2007 8:54 pm Post subject: Multi Consumer on one queue in WebSphereMQ? |
|
|
Newbie
Joined: 13 Dec 2007 Posts: 5
|
Hi All,
I have multi-consumers listening to one queue in WebSphereMQ. I will have problem if I have about 20 threads sending message to the particular queue, after some time, those consumers wont be able to consume anymore. At first, they were able to consume successfully. If I reduce the number of sender threads to 10, those consumers will be able to consume the message.
This problem wont happen if I use other JMS provider.
Any idea what's going wrong here?
Does WebsphereMQ have a lot of sync overhead in this case?
Thanks.
Regards,
Tom |
|
Back to top |
|
 |
bower5932 |
Posted: Fri Dec 14, 2007 3:15 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
What version of WMQ are you using and on what operating system? |
|
Back to top |
|
 |
mythinky |
Posted: Fri Dec 14, 2007 3:19 am Post subject: |
|
|
Newbie
Joined: 13 Dec 2007 Posts: 5
|
Version 6.0
Windows 2003
Will the version and OS will affect?
Thanks. |
|
Back to top |
|
 |
bower5932 |
Posted: Fri Dec 14, 2007 6:12 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
|
mythinky wrote: |
Will the version and OS will affect? |
It shouldn't, but there have been quite a few fixes in the JMS code related to MDBs that stop receiving. I'm assuming that you are running in an AppServer. Is that true?
As far as what might be wrong, are your consumers able to keep up with the messages of your producers (ie, is the backlog growing)? If it is, you could be experiencing some anomalies with the queue agent. See this for more info:
http://www.ibm.com/developerworks/websphere/library/techarticles/0611_titheridge/0611_titheridge.html |
|
Back to top |
|
 |
mythinky |
Posted: Fri Dec 14, 2007 9:44 pm Post subject: |
|
|
Newbie
Joined: 13 Dec 2007 Posts: 5
|
I am running it as a separate program, not within AppServer.
Btw, do you mean I need to change my JMS code to fix the issue?
How to see if the backlog is growing?
My consumers are able to keep up the messages of my producers, as I noticed it from the messages being produced at one time, the most is 20, however for the first few minutes, my consumers (which is 5) are able to process those 20 messages. But after some time, the consumers just stop consuming.
Thanks |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Dec 15, 2007 1:50 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Have you used a connection listener?
[edit]Have you used an ExceptionListener? It gets registered with the connection object.[/edit] _________________ MQ & Broker admin
Last edited by fjb_saper on Sun Dec 16, 2007 8:19 pm; edited 1 time in total |
|
Back to top |
|
 |
mythinky |
Posted: Sun Dec 16, 2007 6:52 pm Post subject: |
|
|
Newbie
Joined: 13 Dec 2007 Posts: 5
|
What do you mean by connection listener?
Sorry, i am newbie. |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Dec 16, 2007 8:16 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Sorry, meant ExceptionListener... Same deal as message listener, but instead of getting triggered by a message this one gets triggered by connection events (connection broken etc...?)
This is what sun has to say about it:
Quote: |
If a JMS provider detects a serious problem with a Connection object, it informs the Connection object's ExceptionListener, if one has been registered. It does this by calling the listener's onException method, passing it a JMSException argument describing the problem.
An exception listener allows a client to be notified of a problem asynchronously. Some connections only consume messages, so they would have no other way to learn that their connection has failed.
A JMS provider should attempt to resolve connection problems itself before it notifies the client of them. |
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
mythinky |
Posted: Sun Dec 16, 2007 8:19 pm Post subject: |
|
|
Newbie
Joined: 13 Dec 2007 Posts: 5
|
I have used that, however, there is no exception occurred at all, they're just not able to consume the message.
Any idea?
thanks |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Dec 16, 2007 8:24 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Well there is this rule:
Whenever an MDB encounters a poison message and the there is no backout threshold the MDB will shutdown after the max retry count is reached, or if maxretry < = backout threshold (SOP).
So I'd say lookout for the redelivery count on the messages in the queue. Looks like you might have some poison message every so often...
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
|