qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajith Attapattu <rajit...@gmail.com>
Subject Re: C++ broker 0.14, java client, flow-to-disk not happening
Date Sun, 01 Apr 2012 02:22:23 GMT
The jms client code looks fine to me and the your observation that messages
are available after a restart confirms that the jms client is marking the
messages as persistent and the broker doing it's part.
(However IIRC messages does not need to be marked persistent for
flow-2-disk to work - but I stand to be corrected).

On a separate note I don't recommend using flow-2-disk as it's very slow
and can drastically affect the broker performance in general.
I don't think the situation has changed in the recent past, therefore my
advice is to not use this feature.

Regards,

Rajith

On Thu, Mar 22, 2012 at 8:41 AM, ParkiratBagga <parkiratbagga@gmail.com>wrote:

> Hi,
>
> I am using Qpid tools to create the queue's on C++ broker 0.14, and a java
> client to publish messages to the queue. Both messages and queues are
> durable/persistent.
>
> I have observed that when I have used, the java client, only the messages
> which enter to the in-memory, are persisted to the persistence store  and
> when I stop and restart my qpid server, the messages are not lost. However,
> if any of the queue limits(size or count) is hit, messages are not flowing
> to disk and all the new messages where lost
>
> But, if I use the spout which is a c++ client, and any of the queue limit
> have been hit, messages are persisting to the disk, and I am not loosing
> messages, even when the queue is full.
>
> My requirement is to use C++ broker and a java client, the all the messages
> should persist to disk when queues are full.
>
> Below is the command which I use to create the queue:
>
> =======================================================================
> *Script to create a queue*
> qpid-config add queue que1 --durable --file-size=24 --file-count=8
> --max-queue-count=20 --limit-policy=flow-to-disk
> =======================================================================
>
> I am using a java client, which is trying to publish messages to the queue.
> Below are the jms connection url, connection details and sample code, to
> show how I publish:
>
> ===========================================================================
> *jms settings:*
>
> connectionfactory.customer.qpidConnectionfactory =
> amqp\://guest\:guest@localhost
> /test?brokerlist\='tcp\://localhost\:5672?retries\='3'&connecttimeout\='10000'&connectdelay\='3000''
>
>
> destination.customer.queue=BURL:direct://amq.direct/que1/que1?routingkey='que1'&exclusive='false'
> ====================
> *Sample Code to create connection*
>
> ConnectionFactory connectionFactory = (AMQConnectionFactory)
> context.lookup("customer.qpidConnectionfactory");
> AMQConnection connection = (AMQConnection)
> connectionFactory.createConnection();
> Session session = connection.createSession(false,
> Session.AUTO_ACKNOWLEDGE);
> connection.start();
> =====================
> *Sample code to create Producer to queue*
>
> Destination destination = (Destination) context.lookup("customer.queue");
> MessageProducer producer = session.createProducer(destination);
> producer.send(message, DeliveryMode.PERSISTENT, 0, 0L);
> ========================================================================
>
> Please help me with this problem.
>
> Thanks in advance.
>
> Regards,
> Parkirat Singh Bagga
>
>
> --
> View this message in context:
> http://qpid.2158936.n2.nabble.com/C-broker-0-14-java-client-flow-to-disk-not-happening-tp7395366p7395366.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message