Created
September 2, 2013 23:35
-
-
Save mheath/6418208 to your computer and use it in GitHub Desktop.
CF NATS Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nats nats = new NatsConnector().addHost("nats://localhost").connect(); | |
CfNats cfNats = new DefaultCfNats(nats); | |
cfNats.subscribe(ComponentDiscover.class, new PublicationHandler<ComponentDiscover, ComponentAnnounce>() { | |
@Override | |
public void onMessage(Publication<ComponentDiscover, ComponentAnnounce> publication) { | |
publication.reply(new ComponentAnnounce(...)); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment