[prev in list] [next in list] [prev in thread] [next in thread] 

List:       activemq-users
Subject:    Re: QueueBrowser not picking all the messages
From:       Mohit Anchlia <mohitanchlia () gmail ! com>
Date:       2013-01-29 1:41:47
Message-ID: CAOT3TWpa5OkaTWBSyAOKwsCAp1tGMCNLjLevHDdSnQM7Y084Wg () mail ! gmail ! com
[Download RAW message or body]


Behaviour I am seeing is wierd:
1) I have 3 network of brokers
2) No consumers on one of the hosts just network of brokers
3) When messages pile up, network of brokers receive those messages only
some of them not all of them. It's between 100-1000
4) At this point no messages are being received by other brokers even
though there are other messages in the queue.
5) Then I attach a consumer, my own client manually and consume 1 messages.
As soon as I do that network of brokers again start to receive messages and
then after 100-1000 messages it stops again.

Is this expected?

On Mon, Jan 28, 2013 at 2:01 PM, Christian Posta
<christian.posta@gmail.com>wrote:

> The general downside is using up too much broker memory when there are no
> consumers for a particular queue (or slow consumers)
> 
> 
> On Mon, Jan 28, 2013 at 2:12 PM, Mohit Anchlia <mohitanchlia@gmail.com
> > wrote:
> 
> > Is there a downside of increasing to a much higher value?
> > 
> > On Mon, Jan 28, 2013 at 1:05 PM, Christian Posta
> > <christian.posta@gmail.com>wrote:
> > 
> > > Can set the max page size using policy entries:
> > > 
> > > http://activemq.apache.org/per-destination-policies.html
> > > 
> > > 
> > > On Mon, Jan 28, 2013 at 1:15 PM, Mohit Anchlia <mohitanchlia@gmail.com
> > > > wrote:
> > > 
> > > > Thanks! It does look related. How can I verify the page size? And is
> > > there
> > > > a workaround?
> > > > 
> > > > On Mon, Jan 28, 2013 at 12:10 PM, Gary Tully <gary.tully@gmail.com>
> > > wrote:
> > > > 
> > > > > there was a recent fix
> > https://issues.apache.org/jira/browse/AMQ-4181
> > > > > 
> > > > > 
> > > > > On 28 January 2013 17:42, Mohit Anchlia <mohitanchlia@gmail.com>
> > > wrote:
> > > > > 
> > > > > > Thanks for testing. Is there anything related to pre-fetch or
> some
> > > > other
> > > > > > property that might cause it to return no elements even though
> > there
> > > > are
> > > > > > elements in the queue?
> > > > > > 
> > > > > > On Mon, Jan 28, 2013 at 6:25 AM, Christian Posta
> > > > > > <christian.posta@gmail.com>wrote:
> > > > > > 
> > > > > > > Not sure. I just ran your test on trunk with 1000 messages and
> it
> > > > > picked
> > > > > > it
> > > > > > > up fine. I also added a test to JmsQueueBrowserTest unit test,
> > > have a
> > > > > > look
> > > > > > > here:
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueBrowserTest.java?r1=1425875&r2=1439420&diff_format=h
> 
> > > > > > > 
> > > > > > > 
> > > > > > > On Fri, Jan 25, 2013 at 1:08 PM, Mohit Anchlia <
> > > > mohitanchlia@gmail.com
> > > > > > > > wrote:
> > > > > > > 
> > > > > > > > Does anyone know why queue browser is only able to pick up
> > first
> > > > 300
> > > > > > > > messages?
> > > > > > > > 
> > > > > > > > When I use consumer it seems to work better but of course it
> > also
> > > > > > removes
> > > > > > > > the messages.
> > > > > > > > 
> > > > > > > > On Thu, Jan 24, 2013 at 5:47 PM, Mohit Anchlia <
> > > > > mohitanchlia@gmail.com
> > > > > > > > > wrote:
> > > > > > > > 
> > > > > > > > > I have around 1K messages in the queue. When I run my queue
> > > > browser
> > > > > > > > > "browser.getEnumeration();" gets only 270-300 messages at
> one
> > > > time.
> > > > > > > > > 
> > > > > > > > > connection = connectionFactory.createConnection();
> > > > > > > > > connection.start();
> > > > > > > > > session = connection.createSession(false,
> > > > > > Session.AUTO_ACKNOWLEDGE);
> > > > > > > > > Queue fq = session.createQueue(from);
> > > > > > > > > QueueBrowser browser = session.createBrowser(fq);
> > > > > > > > > // to
> > > > > > > > > toConnection = toConnectionFactory.createConnection();
> > > > > > > > > toConnection.start();
> > > > > > > > > toSession = toConnection.createSession(false,
> > > > > > > > > Session.AUTO_ACKNOWLEDGE);
> > > > > > > > > Queue tq = toSession.createQueue(to);
> > > > > > > > > toProducer = toSession.createProducer(tq);
> > > > > > > > > Enumeration<Message> e = browser.getEnumeration();
> > > > > > > > > Message message = null;
> > > > > > > > > TextMessage textMessage = null;
> > > > > > > > > String selector = null;
> > > > > > > > > int i = 0;
> > > > > > > > > while (e.hasMoreElements()) {
> > > > > > > > > log.info("Processing " + i);
> > > > > > > > > 
> > > > > > > > > message = e.nextElement();
> > > > > > > > > // final String messageBody = ((TextMessage)
> > > > > message).getText();
> > > > > > > > > // textMessage =
> session.createTextMessage(messageBody);
> > > > > > > > > toProducer.send(message);
> > > > > > > > > log.info(message.getJMSMessageID());
> > > > > > > > > /*
> > > > > > > > > * // log.info("Message: " + messageBody); try {
> > selector
> > > =
> > > > > > > > > * "JMSMessageID = '" + message.getJMSMessageID() +
> "'";
> > //
> > > > > > > > > * consumer = session.createConsumer(fq, selector); //
> > > > > > > > > * consumer.receive(); } finally { //
> consumer.close(); }
> > > > > > > > > */
> > > > > > > > > i++;
> > > > > > > > > }
> > > > > > > > > 
> > > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > --
> > > > > > > *Christian Posta*
> > > > > > > http://www.christianposta.com/blog
> > > > > > > twitter: @christianposta
> > > > > > > 
> > > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > --
> > > > > http://redhat.com
> > > > > http://blog.garytully.com
> > > > > 
> > > > 
> > > 
> > > 
> > > 
> > > --
> > > *Christian Posta*
> > > http://www.christianposta.com/blog
> > > twitter: @christianposta
> > > 
> > 
> 
> 
> 
> --
> *Christian Posta*
> http://www.christianposta.com/blog
> twitter: @christianposta
> 



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic