Github user belaban commented on the issue:
https://github.com/apache/activemq-artemis/pull/726
Try this sample program below (args are config and name):
````
package org.jgroups.tests;
import org.jgroups.JChannel;
import org.jgroups.Message;
import org.jgroups.ReceiverAdapter;
import org.jgroups.View;
import org.jgroups.util.Util;
/**
* @author Bela Ban
* @since x.y
*/
public class bla2 extends ReceiverAdapter {
protected JChannel ch;
public void receive(Message msg) {
System.out.printf("-- msg from %s: %s\n", msg.src(),
msg.getObject());
}
public void viewAccepted(View view) {
System.out.printf("view: %s\n", view);
}
protected void start(String config, String name) throws Exception {
ch=new JChannel(config).name(name).receiver(this).connect("demo");
int counter=1;
for(;;) {
Util.keyPress("<send msg to all except self>");
Message msg=new Message (null, "hello-" +
counter++).setTransientFlag(Message.TransientFlag.DONT_LOOPBACK);
ch.send(msg);
}
}
public static void main(String[] args) throws Exception {
new bla2().start(args[0], args[1]);
}
}
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---