-
-
Save kadyana/d4c73101a54ffe5afb99 to your computer and use it in GitHub Desktop.
Aeron gist
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
// AeronProcessor as a server | |
AeronProcessor processor = AeronProcessor.builder() | |
.name("server") | |
.senderChannel("udp://localhost:12000") | |
.receiverChannel("udp://localhost:12001") | |
.senderOnly(true) | |
.create(); | |
Streams.range(1, 1000) | |
.map(i -> Buffer.wrap("" + i)) | |
.subscribe(processor); | |
// AeronProcessor as a client | |
AeronProcessor processor = AeronProcessor.builder() | |
.name("client") | |
.senderChannel("udp://localhost:12000") | |
.receiverChannel("udp://localhost:12001") | |
.receiverOnly(true) | |
.create(); | |
processor.subscribe( | |
Subscribers.unbounded((next, sub) -> System.out.println(next))); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment