Builder

Builder options

  • URI

  • NATS Options

  • Registering handler

URI

URI allows to connect directly to NATS by URI strings

.uri(String... uri);

NATS Options

NATS options allow to configure connection and also use authentication much easier.

Using credentials

.options(
                        new Options.Builder()
                                .server("nats://localhost:4222")
                                .userInfo("admin", "password")
                                .build()
                )

Register handler

Allows to register message handler

.registerHandler(new TestMessageHandler())

Last updated