Return-Path: Delivered-To: apmail-qpid-users-archive@www.apache.org Received: (qmail 83002 invoked from network); 10 Jun 2010 15:10:01 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 Jun 2010 15:10:01 -0000 Received: (qmail 22864 invoked by uid 500); 10 Jun 2010 15:10:01 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 22842 invoked by uid 500); 10 Jun 2010 15:10:01 -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 22834 invoked by uid 99); 10 Jun 2010 15:10:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jun 2010 15:10:01 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of crolke@redhat.com designates 209.132.183.25 as permitted sender) Received: from [209.132.183.25] (HELO mx02.colomx.prod.int.phx2.redhat.com) (209.132.183.25) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Jun 2010 15:09:54 +0000 Received: from mail06.corp.redhat.com (zmail06.collab.prod.int.phx2.redhat.com [10.5.5.45]) by mx02.colomx.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5AF9XH4019937 for ; Thu, 10 Jun 2010 11:09:33 -0400 Date: Thu, 10 Jun 2010 11:09:33 -0400 (EDT) From: Chuck Rolke To: users@qpid.apache.org Message-ID: <1584458263.416301276182573694.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com> In-Reply-To: <822129227.415771276182222485.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com> Subject: Re: maximum of 9999 messages received from the exchange MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [10.5.5.71] X-Mailer: Zimbra 5.0.21_GA_3150.RHEL4_64 (ZimbraWebClient - FF3.0 (Linux)/5.0.21_GA_3150.RHEL4_64) X-Virus-Checked: Checked by ClamAV on apache.org You may want to try using a new binding that provides a thin interop layer = between your C# client and the C++ Messaging API. To get started with this: 1. Create a Debug build of the cpp/qpid-cpp.sln, the normal cpp build. 2. Open solution cpp/bindings/qpid/dotnet/org.apache.qpid.messaging.sln an= d create a Debug build. Use solution plaforms "Mixed Platforms" for 32-bit = builds and "x86" for 32-bit or 64-bit builds. 3. Project executables are in cpp/src/Debug: * csharp.direct.[sender, receiver] - sends/receives ten simple string me= ssages * csharp.map.[sender, receiver] - sends/receives ampq/map, ampq/list and= normal string messages * csharp.map.callback.[sender, receiver] - sends map/list/string message= s and uses a receiver callback. This new binding is in line for long-term support. More examples are on the= way including the interoperability demos drain/spout and client/server. -Chuck ----- "Rajith Attapattu" wrote: > From: "Rajith Attapattu" > To: users@qpid.apache.org, "pet postulka" > Sent: Wednesday, June 9, 2010 11:27:37 AM GMT -05:00 US/Canada Eastern > Subject: Re: maximum of 9999 messages received from the exchange > > try doing session.markCompleted(new RangeSet() { message.Id }, true) > just after session.MessageAccept(new RangeSet() { message.Id }); >=20 > Rajith >=20 > 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 run > 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 than 9999, I receive only 9999 messages and no more. > After the consumer is restarted I receive another 9999 messages and it > stops receiving again. Can someone tell me, what I am doing wrong? It > seems that there is some limit, but I can not 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 number or not, > the behavior is still same, only 9999 messages at maximum are > received. 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. > > > > =C2=A0Here is the main part of implementation of my publisher: > > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0public void Start() > > =C2=A0 =C2=A0 =C2=A0 =C2=A0{ > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0session =3D connection.CreateS= ession(500000); > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0session.ExchangeDeclare(config= uration.ExchangeName, > configuration.ExchangeType, String.Empty, null, Option.DURABLE); > > =C2=A0 =C2=A0 =C2=A0 =C2=A0} > > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0public void SendMessage(string routingKey, b= yte[] message) > > =C2=A0 =C2=A0 =C2=A0 =C2=A0{ > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0IMessage messageToSent =3D new= Message(); > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 > =C2=A0messageToSent.DeliveryProperties.SetDeliveryMode(MessageDeliveryMod= e.PERSISTENT); > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 > =C2=A0messageToSent.DeliveryProperties.SetRoutingKey(routingKey); > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0messageToSent.AppendData(messa= ge); > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0session.MessageTransfer(config= uration.ExchangeName, > messageToSent); > > =C2=A0 =C2=A0 =C2=A0 =C2=A0} > > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0public void Stop() > > =C2=A0 =C2=A0 =C2=A0 =C2=A0{ > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0session.Close(); > > =C2=A0 =C2=A0 =C2=A0 =C2=A0} > > > > And here is the main part of implementation of my subsriber: > > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0public void Start() > > =C2=A0 =C2=A0 =C2=A0 =C2=A0{ > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0session =3D connection.CreateS= ession(50000); > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0session.ExchangeDeclare(config= uration.ExchangeName, > configuration.ExchangeType, String.Empty, null , Option.DURABLE); > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0session.QueueDeclare(configura= tion.QueueName, > String.Empty, new Dictionary() {{ "qpid.policy_type", > "reject" }}, Option.DURABLE); > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0session.ExchangeBind(configura= tion.QueueName, > configuration.ExchangeName, configuration.RoutingKey); > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0session.AttachMessageListener(= this, > configuration.QueueName); > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0session.MessageSubscribe(confi= guration.QueueName); > > =C2=A0 =C2=A0 =C2=A0 =C2=A0} > > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0public void Stop() > > =C2=A0 =C2=A0 =C2=A0 =C2=A0{ > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0session.Close(); > > =C2=A0 =C2=A0 =C2=A0 =C2=A0} > > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0#region Implementation of IMessageListener > > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0public void MessageTransfer(IMessage message= ) > > =C2=A0 =C2=A0 =C2=A0 =C2=A0{ > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0BinaryReader reader =3D new Bi= naryReader(message.Body, > Encoding.UTF8); > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0byte[] messageBody =3D new byt= e[message.Body.Length - > message.Body.Position]; > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0reader.Read(messageBody, 0, me= ssageBody.Length); > > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0Console.WriteLine(message.Id); > > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0session.MessageAccept(new Rang= eSet() { message.Id }); > > > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (OnMessageReceived !=3D nul= l) > > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0OnMessageReceive= d(identifier, messageBody); > > =C2=A0 =C2=A0 =C2=A0 =C2=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: =C2=A0 =C2=A0 =C2=A0http://qpid.apache.org > > Use/Interact: mailto:users-subscribe@qpid.apache.org > > > > >=20 >=20 >=20 > --=20 > Regards, >=20 > Rajith Attapattu > Red Hat > http://rajith.2rlabs.com/ >=20 > --------------------------------------------------------------------- > Apache Qpid - AMQP Messaging Implementation > Project: http://qpid.apache.org > Use/Interact: mailto:users-subscribe@qpid.apache.org --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:users-subscribe@qpid.apache.org