You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Humphrey <hm...@gmail.com> on 2017/08/14 08:39:37 UTC

Re: Async messaging

Hello, I bumped into the same error. Was not clear to me that you shouldn't
call the future after doing the send:

IgniteMessaging message = ignite.message().withAsync();
message.send("destination", "hello world");
IgniteFuture future = message.future();
log.info("Keeps on throwing exception")

Was giving me the exception:
Exception in thread "pub-#67%null%" java.lang.IllegalStateException:
Asynchronous operation not started.
    at
org.apache.ignite.internal.AsyncSupportAdapter.future(AsyncSupportAdapter.java:91)
    at
org.apache.ignite.internal.AsyncSupportAdapter.future(AsyncSupportAdapter.java:73)

The correct way to use it is without calling the message.future()

IgniteMessaging message = ignite.message().withAsync();
message.send("destination", "hello world");
log.info("Doing async!")

Hope this helps someone else.



--
View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Async-messaging-tp8719p16157.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.