Created
May 30, 2018 17:28
-
-
Save lucperkins/f592106f1b7d2de023c6a342e7f932b5 to your computer and use it in GitHub Desktop.
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
PulsarClient client = PulsarClient.builder() | |
.serviceUrl("pulsar://localhost:6650") | |
.build(); | |
Producer<SensorReading> producer = | |
client.newProducer(JSONSchema.of(SensorReading.class)) | |
.topic("sensor-data") | |
.create(); | |
Consumer<SensorReading> consumer = | |
client.newConsumer(JSONSchema.of(SensorReading.class) | |
.topic("sensor-data") | |
.subscriptionName("sensor-subscriber") | |
.subscribe(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment