qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ParkiratBagga <parkiratba...@gmail.com>
Subject C++ broker 0.14, java client, flow-to-disk not happening
Date Thu, 22 Mar 2012 12:41:06 GMT
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
View raw message