curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Zimmerman <jor...@jordanzimmerman.com>
Subject Re: DistributedQueue - subscriber not receiving all messages
Date Wed, 02 Jul 2014 16:17:14 GMT
I’ll bet you had a bad node in queue’s path. If you look at the logs there will be a message
regarding these. See this Tech Note: https://cwiki.apache.org/confluence/display/CURATOR/TN7


From: Donald Laidlaw donlaidlaw@me.com
Reply: user@curator.apache.org user@curator.apache.org
Date: July 2, 2014 at 8:33:40 AM
To: user@curator.apache.org user@curator.apache.org
Subject:  Re: DistributedQueue - subscriber not receiving all messages  

I stopped zookeeper and deleted all its data and started fresh.

Now, I am receiving queued events in the consumer as expected. No code changes!

For some reason there must have been a problem with either the zookeeper data or the instance
that was running. This is very strange indeed. I will see if it happens again and report it.

Thanks,
-Don



Well, I don't think the producer side is consuming them, because I can see the messages when
using the command line client. But here is the producer code:

managerNodeStateQueue = QueueBuilder.builder(curatorFramework, 
null, 
new JsonQueueSerializer<>(NodeStateEvent.class),
queuePath).buildQueue();
managerNodeStateQueue.start();
...
managerNodeStateQueue.put(new NodeStateEvent("Running"));

With the command line client I can "ls /manager/nodeStateQueue" and see the messages. They
stay in the queue after they are written. I need to stop and start the JVM of the consumer
to actually consume them.

The queuePath variable is set to "/manager/nodeStateQueue".

Thanks for looking.



Mime
View raw message