Return-Path: Delivered-To: apmail-qpid-users-archive@www.apache.org Received: (qmail 13630 invoked from network); 10 Aug 2010 22:24:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 10 Aug 2010 22:24:51 -0000 Received: (qmail 41768 invoked by uid 500); 10 Aug 2010 22:24:50 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 41694 invoked by uid 500); 10 Aug 2010 22:24:50 -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 41684 invoked by uid 99); 10 Aug 2010 22:24:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Aug 2010 22:24:49 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of nekresh@gmail.com designates 209.85.210.42 as permitted sender) Received: from [209.85.210.42] (HELO mail-pz0-f42.google.com) (209.85.210.42) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Aug 2010 22:24:43 +0000 Received: by pzk30 with SMTP id 30so6615398pzk.15 for ; Tue, 10 Aug 2010 15:24:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=nmkVHkPukH1gCRQ/VL+hSShZhapdsutv0pBdKovCUVk=; b=Et3taMcHYgaU3lKnlEQIVgdKwBbbGz+pzOKLv/+sd6qlF8avi8hd8wC2JAtRq7xmeV IExRQwFZNO2AYJnQWIEzB36q6PKe20UMezAg4c/d1TQijoH2D1RrTpDsEF8y+Ei2AEAy gX5DhzdBkfh7p0ywsUSFefJOWGuZieRzvNhQg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=cw5R42rNRKoNsOVCBdLmMfEyYcTEUGvrygDMvjsioPuAAGJeW4aGjNAoSXaGPnHZgY /wCA4PQYmGTzsY8Bl/wJCugIJdC3L7q0kRzGht7SWSPS0gTm1VeFJ63ft1UB01AL7Xb5 bYKeT+HFKHAjK1D0CyS17Dj7uldn2icnn/JlI= Received: by 10.142.161.19 with SMTP id j19mr3603497wfe.234.1281479063134; Tue, 10 Aug 2010 15:24:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.12.11 with HTTP; Tue, 10 Aug 2010 15:24:03 -0700 (PDT) From: nekresh Date: Wed, 11 Aug 2010 00:24:03 +0200 Message-ID: Subject: C# client on qpid 0.6 To: users@qpid.apache.org Content-Type: text/plain; charset=ISO-8859-1 Hello everyone. I'm currently testing qpid 0.6 and have a few problems. I've first tried the Messaging API. On the C++ 0.6 broker, it simply doesn't work. Well, it's in the documentation (http://qpid.apache.org/compatibility.html) so I won't try more that way. I then tried the Java 0.6 broker but wasn't able to receive message at all. Even in debug trace, the message are received by the broker and forwarded to the right queue but I never receive them. Am I missing something ? I'm creating the queue, binding it to the exchange amq.direct with the correct routing_key. static void Main(string[] args) { Console.WriteLine("Init"); var info = new QpidConnectionInfo(); info.AddBrokerInfo(new AmqBrokerInfo("tcp", "localhost", 5672, false)); info.Username = "guest"; info.Password = "guest"; using (var connection = new AMQConnection(info)) { using (var ch = connection.CreateChannel(false, Apache.Qpid.Messaging.AcknowledgeMode.PreAcknowledge)) { ch.DeclareQueue("message_queue", true, false, false); ch.Bind("message_queue", "amq.direct", "test"); var builder = ch.CreateConsumerBuilder("message_queue"); using (var consumer = builder.Create()) { Console.WriteLine("Ready"); while (true) { var message = consumer.Receive(); //var message = consumer.Receive(10000); if (message != null) { Console.WriteLine("message received"); } } } } } } Then I tried the 0-10 API on the Java broker, but have strange behavior. I can send and receive messages, but the messages are kept in the queue. I receive the message only once but, when I restart my consumer, then message are sent back to me. As they aren't removed from the queue, I guess the queue will become filled up very fast and stop working. static void Main(string[] args) { Console.WriteLine("Init"); var client = new Client(); client.Connect("localhost", 5672, "", "guest", "guest"); var ch = client.CreateSession(10000); ch.QueueDeclare("message_queue", Option.DURABLE); ch.ExchangeBind("message_queue", "amq.direct", "test"); ch.AttachMessageListener(new Listener(), "message_queue"); ch.MessageSubscribe("message_queue"); Console.WriteLine("Press enter to exit"); Console.ReadLine(); Console.WriteLine("Stopping"); ch.Close(); client.Close(); } With a class Listener displaying the message received. I haven't found a way to acknoledge received message in the 0-10 API, only the listener way. How is it possible to ack received message ? In the list archive, I've found a message regarding which API implementation to choose and the Messaging one was preferred. Do you think it still applies now ? Thanks for reading my (too) long message. Nekresh --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:users-subscribe@qpid.apache.org