activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oseymen <>
Subject Message loss in network of brokers - transactional send
Date Fri, 10 Jun 2011 15:34:24 GMT
I seem to be losing some messages in a network of brokers topology in the
following setup:

- 1 producer pushing messages to a persistent queue (let’s call it
“IN.QUEUE.Broker1”) on one broker (broker1) inside a transaction. Producer
commits in every 100 messages.

- IN.QUEUE is a composite queue which forwards the messages to another queue
in broker1 (let’s call this “Q1”). Network of brokers is configured to
forward messages from Q1 to broker2. Q1 is listed in
staticallyIncludedDestinations so it will always forward. 

- There are no consumers. I am looking at the message counts from AMQ web
interface once all messages are in.

- Second broker (broker2) is connected to broker1 via network of brokers
(configuration below).

My test case:
1.	Purge all messages in all queues
2.	Start producer and send 10,000 messages to IN.QUEUE in broker1. At this
point, I start to see messages forwarded to broker2.
3.	Stop/kill broker2. I am running the brokers in console. So in order to
kill the broker I just kill the console. At this point I am seeing the
messages accumulated in broker1.
4.	Start broker2.
5.	When all 10,000 is sent, I look at the total number of messages in each
broker and they are same. I just run the test again and I have 9981 messages
in broker2 instead of 10,000. I can replicate this whenever I run this test.

I also looked at My issue
seems to be similar with this. So I converted my code from Spring jms
template to Apache NMS. But issue is still there.

Can you please advise whether this is a known issue or something is wrong in
my configuration?


	  <compositeQueue name="IN.Broker1">
		  <queue physicalName="Q1" />

		<queue physicalName="Q1" />


var textMessage = GetMessageContent();
var connectionFactory = new ConnectionFactory(ServerUri);

using (var connection = connectionFactory.CreateConnection())

	using (var session =
		var queue = session.GetQueue(destination);
		using (var producer = session.CreateProducer(queue))
			producer.DeliveryMode = MsgDeliveryMode.Persistent;

			for (int i = 1; i < numberOfMessagesToSend+1; i++)
				var message = producer.CreateTextMessage(textMessage);

				if (i % 100 == 0)


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message