vertx / io.vertx.core.eventbus / EventBus / registerCodec

registerCodec

abstract fun registerCodec(codec: MessageCodec<Any, Any>): EventBus

Register a message codec.

You can register a message codec if you want to send any non standard message across the event bus. E.g. you might want to send POJOs directly across the event bus.

To use a message codec for a send, you should specify it in the delivery options.

Parameters

codec - the message codec to register

Return
a reference to this, so the API can be used fluently