You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Oru <de...@gmail.com> on 2016/05/25 06:35:41 UTC

Unordered Messages do not arrive on a different Thread

Hi There!
While experimenting with Topic Based Messaging I found that the Listener
cannot receive unordered messages if the listener is on another Java Thread.
This limitation does not hold true for ordered messaging.
I am attaching the Java Project as a Zip file.
Please let me know what's wrong.
IgniteMaven.zip
<http://apache-ignite-users.70518.x6.nabble.com/file/n5160/IgniteMaven.zip>  
Thanks,
Debasish



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Unordered-Messages-do-not-arrive-on-a-different-Thread-tp5160.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Unordered Messages do not arrive on a different Thread

Posted by Oru <de...@gmail.com>.
Hi,
Thank you for the response.
It works now.
Regards,
Debasish



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Unordered-Messages-do-not-arrive-on-a-different-Thread-tp5160p5165.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

Re: Unordered Messages do not arrive on a different Thread

Posted by Vladislav Pyatkov <vl...@gmail.com>.
Hello,

I can't see any  synchronization in your example.
How about use CountDownLatch for waiting subscription.
For example:
In MainTest

CountDownLatch latch = new CountDownLatch(1);

executorService.submit(new Subscribe(latch));

latch.await();

And append in Subscribe (after subscription):

latch.countDown();



On Wed, May 25, 2016 at 9:35 AM, Oru <de...@gmail.com> wrote:

> Hi There!
> While experimenting with Topic Based Messaging I found that the Listener
> cannot receive unordered messages if the listener is on another Java
> Thread.
> This limitation does not hold true for ordered messaging.
> I am attaching the Java Project as a Zip file.
> Please let me know what's wrong.
> IgniteMaven.zip
> <http://apache-ignite-users.70518.x6.nabble.com/file/n5160/IgniteMaven.zip
> >
> Thanks,
> Debasish
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Unordered-Messages-do-not-arrive-on-a-different-Thread-tp5160.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 
Vladislav Pyatkov