These are chat archives for atomix/atomix

11th
Apr 2017
Jordan Halterman
@kuujo
Apr 11 2017 05:46
awesome thanks @himanshug I was at a conference last week but back at home (at work) so let’s have at it… still working through my emails but I’ll get there :-P
aamargajbhiye
@aamargajbhiye
Apr 11 2017 06:57
I created Atomix cluster with 3 servers. Out of those 3, 2 are part of distributed group. I connected client to the cluster and when I am trying to get same distributed group. I am getting following exception - com.sun.jdi.invocationexception occurred invoking method < Well, now I am getting CompletableFuture but it is as not completed. Documentatation says, once group is created, CompletableFuture as completed will be returned. I could join server through AtomixReplica but AtomixClient is not able to join. Can anyone please help ?
Jordan Halterman
@kuujo
Apr 11 2017 08:25
A completed future will not be returned, a CompletableFuture that will later be completed once the group is created will be returned. Can we see your code?
ugh… I spilled Red Bull on my brand new laptop today
that’s what I get for trying to over work myself :-)
aamargajbhiye
@aamargajbhiye
Apr 11 2017 08:58

This is what my server is doing.

replica.bootstrap().join();
DistributedGroup group= replica.getGroup("test-group").get();
System.out.println("Joining membership group");
group.join().thenAccept(member -> {
System.out.println("Joined group with member ID: " + member.id());
MessageConsumer<String> consumer = member.messaging().consumer("tasks");
consumer.onMessage(task -> {
System.out.println("Received message");
try {
Thread.sleep(100);
} catch (InterruptedException e) {
task.ack();
}
});
});

First server creates group and other servers get reference to that group and joins that group.

My client code

DistributedGroup group= client.getGroup("test-group").get();
Collection<GroupMember> members=group.members();
for(GroupMember member:members){
String id=member.id();
System.out.println("id is "+id);
}

But I am not getting anything when I am trying to get distributed-group by using instance of AtomixClient.

Jordan Halterman
@kuujo
Apr 11 2017 08:59
not getting anything, meaning it’s blocked?
aamargajbhiye
@aamargajbhiye
Apr 11 2017 09:00
Yes. I guess, it is blocked.
Jordan Halterman
@kuujo
Apr 11 2017 09:01
on getGroup? but the client is connected? Can you enable TRACE logging and see what the client says?
aamargajbhiye
@aamargajbhiye
Apr 11 2017 09:02
I am getting CompletableFuture on getGroup, but when I call get() on it, it gets blocked.
I will enable trace and see what I am getting there.
Jordan Halterman
@kuujo
Apr 11 2017 09:03
You’ll always get a future because there’s no blocking inside the client. The future’s just not being completed for some reason that should be shown by those logs
aamargajbhiye
@aamargajbhiye
Apr 11 2017 09:06
@kuujo , Thanks, I will check logs.
Himanshu
@himanshug
Apr 11 2017 13:54
@kuujo thanks, please know that I can setup a hangout to discuss the story and give you more context if that works