Hello,
I have not find unfair consumption of queue.
I added simple modification into your case:
*AtomicLong messageCounter = new AtomicLong();*
* ExecutorService consumerThread =
Executors.newSingleThreadExecutor();*
* consumerThread.execute(() -> {*
* while (true) {*
* System.out.println("Number taken: " + queue.take());*
* System.out.println("The consumer takes " +
messageCounter.incrementAndGet() + " messages");*
* try {*
* Thread.sleep(3500);*
* } catch (InterruptedException e) {*
* e.printStackTrace();*
* }*
* }*
* });*
for tracking consume message from queue.
After some time waiting consumption is equivalent:
Other forOldest
The consumer takes 213 messages Number taken: 433
Number taken: 428 The consumer takes 217 messages
The consumer takes 214 messages Number put: 753
Number taken: 430 Number put: 754
The consumer takes 215 messages Number put: 755
Number taken: 432 Number taken: 435
The consumer takes 216 messages The consumer takes 218 messages
Number taken: 434 Number put: 756
The consumer takes 217 messages Number put: 757
On Wed, Aug 31, 2016 at 9:01 PM, juanma.cvega <[email protected]>
wrote:
> Hi,
>
> thanks for opening the ticket.
> I think I have subscribed already. I've followed the instructions in the
> email 3 times already.
>
> Any suggestion about the last part of the email? I'm still not able to make
> the queue consumption fair when 2 instances are running. Using the same
> sleep time for both the producer and the consumers shows that only one of
> the instances is actually consuming from the queue.
>
> Thanks again.
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Clearing-a-distributed-queue-hangs-
> after-taking-down-one-node-tp7353p7441.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>
--
Vladislav Pyatkov