The solution is rather simple, at subclass Reciever add:
run { ... if(jg) { obj=channel.receive(0); if(obj instanceof Message)
else
} else
number=in.readInt(); matrix[number][1]=1;
if (num_received != number)
... num_received++;
See at org.jgroups.tests.SpeedTest:
If pakets get lost - without using JGroups but pure sockets - the SpeedTest never ends.