[jboss-user] [JBoss Messaging] - Re: Selector Help needed - Possible alternative suggestions
anhminh_tran
do-not-reply at jboss.com
Tue Jun 26 05:57:15 EDT 2007
Hi Tim,
You are right about the consumers prefetching messages from the queue. It had nothing to do with selectors. I had no selectors and still experienced the same thing.
I made a sample producer that allows me to put some messages in the queue.. I then had a consumer that reads from the queue.. then wait for 30 seconds.. I then had another instance of the same consumer run.. it seems that by the time it ran.. the first consumer had already prefetched all the messages off the queue.. like you said..
So, I tried setting the PrefetchSize to 1. But it did not work... I experienced the same issue. Here is my mbean definition in my connection-factory-service.xml
<mbean code="org.jboss.jms.server.connectionfactory.ConnectionFactory"
name="jboss.messaging.connectionfactory:service=ConnectionFactory"
xmbean-dd="xmdesc/ConnectionFactory-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer
<depends optional-attribute-name="Connector">jboss.messaging:service=Connector,transport=bisocket
jboss.messaging:service=PostOffice
/ConnectionFactory
/XAConnectionFactory
java:/ConnectionFactory
java:/XAConnectionFactory
1
Our use case is that we will not have many many messages.. but what we will have are long running jobs that are a result of the messages being picked up by the consumers.. Our plan is that by the time we feel that there are too many messages in the queue... we will just add more consumers to minimize the messages in the queue...
Could you please let me know if I am using the PrefetchSize attribute properly?
Thanks,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057620#4057620
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057620
More information about the jboss-user
mailing list