activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From patrik <patri...@gmail.com>
Subject Unbrowsable ghost message using ActiveMQ running LevelDB and Camel.
Date Tue, 13 Nov 2012 16:33:21 GMT
Hi!

We have experienced some problems with "ghost" messages running:
ActiveMQ 5.6 running KahaDB and Camel 2.9.2

These "ghost" messages appears to be pending, but when we try to consume or
browse them, they are gone.
Fortunately they reappear when we restart the broker.
In the past six month we have only got three of these messages in
production, so it has been very hard to debug these.

We tried to test:
ActiveMQ 5.7 running LevelDB and Camel 2.10.2

And now we can reproduce this "ghost" message almost every time running this
code:

	public static void main(String[] args) throws Exception {
		DefaultCamelContext context = new DefaultCamelContext();
		context.addComponent("activemq",
ActiveMQComponent.activeMQComponent("tcp://localhost:61616"));
		send(context, 4000);
		read(context, 4000);
		context.stop();
	}

	private static void send(DefaultCamelContext context, int count) throws
Exception {
		ProducerTemplate producer = context.createProducerTemplate();
		for (int i=1; i<=count; i++) {
			producer.sendBody("activemq:ghost",
RandomStringUtils.randomAlphanumeric(100000));
		}
		producer.stop();
	}

	private static void read(DefaultCamelContext context, int count) throws
Exception {
		ConsumerTemplate consumer = context.createConsumerTemplate();
		for (int i=1; i<=count; i++) {
			consumer.receive("activemq:ghost");
			System.out.println("reciving: " + i);
		}
		consumer.stop();
	}

Some keys to reproduce this problem is:
* LevelDB.
* Greater chance with more and larger messages.
* Produce all messages before starting to consume.

We can find similar questions about this issue but with older versions and
upgrading as the solution.

Should we just upgrade to:
ActiveMQ 5.7 running KahaDB and Camel 2.10.2
or are we doing something wrong?

Thanks
Patrik Björk



--
View this message in context: http://activemq.2283324.n4.nabble.com/Unbrowsable-ghost-message-using-ActiveMQ-running-LevelDB-and-Camel-tp4659263.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message