Return-Path: Delivered-To: apmail-qpid-users-archive@www.apache.org Received: (qmail 37774 invoked from network); 9 Jun 2010 15:33:42 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 9 Jun 2010 15:33:42 -0000 Received: (qmail 42880 invoked by uid 500); 9 Jun 2010 15:33:42 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 42843 invoked by uid 500); 9 Jun 2010 15:33:41 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 42835 invoked by uid 99); 9 Jun 2010 15:33:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jun 2010 15:33:41 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of pet.postulka@email.cz designates 77.75.76.26 as permitted sender) Received: from [77.75.76.26] (HELO mxh.seznam.cz) (77.75.76.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jun 2010 15:33:33 +0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=email.cz; h=In-Reply-To:Received:Date:Reply-To:Cc:To:From:Subject:Mime-Version:Message-Id:Content-Transfer-Encoding:Content-Type:X-Abuse:X-Seznam-User:X-QM-Mark; b=DqtX+hSx7iH8Lqh/IbUdDSPXUxWSu9iPkLOe/TuiYTZGFn3E/286WQ3FHnmXt48DE C6n7Nb8syrC3F427AqJuxFSivEBET+VGXmY2dcbhVniLK/4Em735aU6zHE/Jhe1LJgd EvOmyI+XfS0IxsJwD0PKTbANUAOdRXt4gSjR6xI= In-Reply-To: Received: from hidden.wood-co.cz (hidden.wood-co.cz [194.213.49.62]) by email.seznam.cz (Email.Seznam.cz) with HTTP for pet.postulka@email.cz; Wed, 9 Jun 2010 17:30:14 +0200 (CEST) Date: Wed, 09 Jun 2010 17:33:10 +0200 (CEST) Reply-To: pet.postulka@email.cz Cc: users@qpid.apache.org To: =?us-ascii?Q?Rajith=20Attapattu?= From: =?us-ascii?Q?Petr=20Postulka?= Subject: =?us-ascii?Q?Re=3A=20Re=3A=20maximum=20of=209999=20messages=20received=20from=20the=20exchange?= Mime-Version: 1.0 Message-Id: <33466.7838.17219-13981-223591161-1276097590@email.cz> Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-2" X-Abuse: abuse@seznam.cz X-Seznam-User: pet.postulka@email.cz X-QM-Mark: email-qm4<464910570> X-Virus-Checked: Checked by ClamAV on apache.org Thank you very much Rajith, I will try today evening and let you know if it helps. Can I ask, what markCompleted method does? Thank you and kind regards, Petr > ------------ P=F9vodn=ED zpr=E1va ------------ > Od: Rajith Attapattu > P=F8edm=ECt: Re: maximum of 9999 messages received from the exchange > Datum: 09.6.2010 17:27:43 > ---------------------------------------- > try doing session.markCompleted(new RangeSet() { message.Id }, true) > just after session.MessageAccept(new RangeSet() { message.Id }); > > Rajith > > On Tue, Jun 8, 2010 at 6:16 PM, Petr Postulka = wrote: > > Hello All, > > > > I have just started to do some tests with Apache Qpid and i have ru= n into a > problem with maximum number of messages, which can be received by the= > subscriber. > > > > I am using a C++ broker under Windows 7 and C# client libraries in = my test > application. If I am sending small amount of messages, everything is = working > fine, but when i tried to increase the number of messages to more tha= n 9999, I > receive only 9999 messages and no more. After the consumer is restart= ed I > receive another 9999 messages and it stops receiving again. Can someo= ne tell me, > what I am doing wrong? It seems that there is some limit, but I can n= ot find > where. I have found properties like qpid.max_size and qpid.max_count,= which can > be set on QueueDeclare method, but whether I put there some big numbe= r or not, > the behavior is still same, only 9999 messages at maximum are receive= d. However > if I set qpid.max_count=3D10, it behaves correctly, only 10 messages = are queued > and next messages are rejected. So it seems, that this parameter does= not > influence the strange behavior. > > > > =A0Here is the main part of implementation of my publisher: > > > > =A0 =A0 =A0 =A0public void Start() > > =A0 =A0 =A0 =A0{ > > =A0 =A0 =A0 =A0 =A0 =A0session =3D connection.CreateSession(500000)= ; > > =A0 =A0 =A0 =A0 =A0 =A0session.ExchangeDeclare(configuration.Exchan= geName, > configuration.ExchangeType, String.Empty, null, Option.DURABLE); > > =A0 =A0 =A0 =A0} > > > > =A0 =A0 =A0 =A0public void SendMessage(string routingKey, byte[] me= ssage) > > =A0 =A0 =A0 =A0{ > > =A0 =A0 =A0 =A0 =A0 =A0IMessage messageToSent =3D new Message(); > > =A0 =A0 =A0 =A0 =A0 > =A0messageToSent.DeliveryProperties.SetDeliveryMode(MessageDeliveryMo= de.PERSISTENT); > > =A0 =A0 =A0 =A0 =A0 =A0messageToSent.DeliveryProperties.SetRoutingK= ey(routingKey); > > =A0 =A0 =A0 =A0 =A0 =A0messageToSent.AppendData(message); > > =A0 =A0 =A0 =A0 =A0 =A0session.MessageTransfer(configuration.Exchan= geName, > messageToSent); > > =A0 =A0 =A0 =A0} > > > > =A0 =A0 =A0 =A0public void Stop() > > =A0 =A0 =A0 =A0{ > > =A0 =A0 =A0 =A0 =A0 =A0session.Close(); > > =A0 =A0 =A0 =A0} > > > > And here is the main part of implementation of my subsriber: > > > > =A0 =A0 =A0 =A0public void Start() > > =A0 =A0 =A0 =A0{ > > =A0 =A0 =A0 =A0 =A0 =A0session =3D connection.CreateSession(50000);= > > =A0 =A0 =A0 =A0 =A0 =A0session.ExchangeDeclare(configuration.Exchan= geName, > configuration.ExchangeType, String.Empty, null , Option.DURABLE); > > =A0 =A0 =A0 =A0 =A0 =A0session.QueueDeclare(configuration.QueueName= , String.Empty, new > Dictionary() {{ "qpid.policy_type", "reject" }}, > Option.DURABLE); > > =A0 =A0 =A0 =A0 =A0 =A0session.ExchangeBind(configuration.QueueName= , > configuration.ExchangeName, configuration.RoutingKey); > > =A0 =A0 =A0 =A0 =A0 =A0session.AttachMessageListener(this, configur= ation.QueueName); > > =A0 =A0 =A0 =A0 =A0 =A0session.MessageSubscribe(configuration.Queue= Name); > > =A0 =A0 =A0 =A0} > > > > =A0 =A0 =A0 =A0public void Stop() > > =A0 =A0 =A0 =A0{ > > =A0 =A0 =A0 =A0 =A0 =A0session.Close(); > > =A0 =A0 =A0 =A0} > > > > =A0 =A0 =A0 =A0#region Implementation of IMessageListener > > > > =A0 =A0 =A0 =A0public void MessageTransfer(IMessage message) > > =A0 =A0 =A0 =A0{ > > =A0 =A0 =A0 =A0 =A0 =A0BinaryReader reader =3D new BinaryReader(mes= sage.Body, > Encoding.UTF8); > > =A0 =A0 =A0 =A0 =A0 =A0byte[] messageBody =3D new byte[message.Body= .Length - > message.Body.Position]; > > =A0 =A0 =A0 =A0 =A0 =A0reader.Read(messageBody, 0, messageBody.Leng= th); > > > > =A0 =A0 =A0 =A0 =A0 =A0Console.WriteLine(message.Id); > > > > =A0 =A0 =A0 =A0 =A0 =A0session.MessageAccept(new RangeSet() { messa= ge.Id }); > > > > =A0 =A0 =A0 =A0 =A0 =A0if (OnMessageReceived !=3D null) > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0OnMessageReceived(identifier, messag= eBody); > > =A0 =A0 =A0 =A0} > > > > > > I would be very glad if someone can point me to right direction how= to remove > the 9999 message limit. > > > > Thanks a lot in advance. > > > > Kind regards, > > > > Petr > > > > > > > > -------------------------------------------------------------------= -- > > Apache Qpid - AMQP Messaging Implementation > > Project: =A0 =A0 =A0http://qpid.apache.org > > Use/Interact: mailto:users-subscribe@qpid.apache.org > > > > > > > > -- > Regards, > > Rajith Attapattu > Red Hat > http://rajith.2rlabs.com/ > > > Petr Postulka --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:users-subscribe@qpid.apache.org