-
1. Re: Slow consumer is blocking producer
gaohoward Oct 19, 2009 10:47 PM (in response to poonamagarwal)What kind of subscriber you create? Can you try durable and non-durable and see if they make any difference? Thanks.
Howard -
2. Re: Slow consumer is blocking producer
bershath27 Oct 22, 2009 4:19 AM (in response to poonamagarwal)What's your client application? Is it a plain JMS client ? Can I take a look at your client code please?
-
3. Re: Slow consumer is blocking producer
poonamagarwal Nov 20, 2009 8:48 AM (in response to poonamagarwal)My subscriber is non-durable. Performance of non-durable should be better than a durable one. So, I don't think this will make a difference.
My client code i.e. MessageListener looks like this:public class FMEventSubscriber implements MessageListener { public void onMessage(Message message) { if ( message instanceof ObjectMessage){ ObjectMessage objMessage = (ObjectMessage)message; Integer responseMsgType; try { handleFMEvent(responseMsgType, objMessage.getObject() ); }catch (Exception e ){ log.error("Un-Expected error in message processing. .."); } }else{ log.error("Unknow type of FM message receiv..."); } }
Here, handleFMEvent calls other sessionbeans.
I have noticed that if I comment out the call to handleFMEvent() then the message processing is fast. But, the main question here is that it(consumer) should not block a producer.
Do I have the queue up the messages myself and then have a QueueEventprocessor publish the messages in a background thread?
-Poonam. -
4. Re: Slow consumer is blocking producer
gaohoward Nov 23, 2009 1:04 AM (in response to poonamagarwal)Hello,
I did a simple test and I couldn't see there is a problem. I used the topic example in JBM 1.x with some changes. I sent 40k messages and had a message listener. In its onMessage() I gave a 5 sec sleep.
Tests shows in about 10 sec all messages have been sent while at the receiving end only two messages was arrived.
Do you have a test to reproduce this?
Howard -
5. Re: Slow consumer is blocking producer
poonamagarwal Nov 24, 2009 1:14 PM (in response to poonamagarwal)Sorry gaohoward,
I do not have a performance test to reproduce this. I reproduce this manually.
1. Are you sending 40k messages inside a loop in TopicExample.
I mean do you do createConnection before you publish every message or are you re-using the connection object before you publish every message.
I had tried caching these objects but did not get any improvement.
Is it possible for you to send me the modified version of the TopicExample?
2. Another difference I have is : I am using
session.createObjectMessage(). Is this making the publish process slow?
I have custom objects to be send in messages. Does the message type really matter?
I am still puzzled with one fact, if I comment the processing logic of each message then the whole process gets faster. I invoke some session beans to do some calculations on receiving each message.
Any help is appreciated.
-Poonam.