-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
API Proposal:
class MyExample(){
private Bridge bridge;
private void newsTopic(final Message message){
System.out.println(message.getSubscriber() + " has news: " + message.getText());
}
private void helloTopic(final Message message){
bridge.publish("hello", "hello " + message.getSubscriber());
}
public void run(){
bridge = BrigeBuilder.connect("http://localhost:8080")
.subscribe("news", this::newsTopic)
.subscribe("hello", this::helloTopic)
.options(Options.discardOwnMessages, true)
.options(Options.refresh, 1500)
.options(Options.logMessages, true)
.build();
bridge.publish("hello", "hello world");
}
}