Question about IgniteQueueExample

classic Classic list List threaded Threaded
2 messages Options
Tommy Yeh Tommy Yeh
Reply | Threaded
Open this post in threaded view
|

Question about IgniteQueueExample

This post has NOT been accepted by the mailing list yet.
I am new to the Ignite.

Try to understand the IgniteQueue from
https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/datastructures/IgniteQueueExample.java

Two scenarios as below:
1. broadcast each node to wait for data from queue then put data to queue.
2. put data to queue then broadcast each node to read data from queue.

The example seems is second scenario.

Is first scenario possible to do ?

Thanks for your help!
vkulichenko vkulichenko
Reply | Threaded
Open this post in threaded view
|

Re: Question about IgniteQueueExample

Hi,

Can you please properly subscribe to the mailing list so that the community can receive email notifications? Here is the instruction: http://apache-ignite-users.70518.x6.nabble.com/mailing_list/MailingListOptions.jtp?forum=1

Tommy Yeh wrote
I am new to the Ignite.

Try to understand the IgniteQueue from
https://github.com/apache/ignite/blob/master/examples/src/main/java/org/apache/ignite/examples/datastructures/IgniteQueueExample.java

Two scenarios as below:
1. broadcast each node to wait for data from queue then put data to queue.
2. put data to queue then broadcast each node to read data from queue.

The example seems is second scenario.

Is first scenario possible to do ?

Thanks for your help!
The example broadcasts the closure only to demonstrate that you can manipulate with the queue from any node in the topology. You can have several clients that will write or read to/from the queue and the whole process will be globally synchronized. So yes, the first scenario is definitely possible.

-Val