You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by mARK bLOORE <mb...@gmail.com> on 2009/10/01 23:22:53 UTC
Re: calling publish or ack too fast
Rafael answered this in another thread. The thing to do is call
client.channel(0).connection_close(reply_code=200)
before
client.close()
On Tue, Sep 29, 2009 at 1:14 PM, mARK bLOORE <mb...@gmail.com> wrote:
> I am using the Java broker and Python client, with the 0.8 spec. I
> find that if I publish flat out (around 5000 mps, with messages of
> about 10 characters) then many of them get lost unless I introduce a
> sleep. If I sleep 5 seconds before closing the channel, around 10k to
> 15k messages actually get published. A shorter sleep means fewer
> messages. Introducing a short sleep after each publish call means
> they all get through (100k of them), but at less than 100 mps.
>
> I have a similar problem subscribing to a queue: If i don't sleep
> before closing the subscription and channel, it appears that messages
> don't all get acknowledged. I am using the queue, and calling both
> queue.task_done and channel.basic_ack.
>
> My app will publish about 300 mps to start, and I would like to get up
> to at least 1000 mps.
>
> Is there a way to make basic_publish and basic_ack work reliably at
> high rates, perhaps by closing things properly? The queue and
> exchange are durable, but the messages are not persistent. I am
> closing with
>
> channel.basic_cancel(reply.consumer_tag) # if basic_consume was called.
> channel.close()
> client.close()
>
> --
> mARK bLOORE <mb...@gmail.com>
>
--
mARK bLOORE <mb...@gmail.com>
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org