vertx / io.vertx.reactivex.core.eventbus / MessageConsumer

# MessageConsumer

`open class MessageConsumer<T : Any> : ReadStream<Message<T>>`

An event bus consumer object representing a stream of message to an io.vertx.reactivex.core.eventbus.EventBus address that can be read from.

The `io.vertx.reactivex.core.eventbus.EventBus#consumer` or `io.vertx.reactivex.core.eventbus.EventBus#localConsumer` creates a new consumer, the returned consumer is not yet registered against the event bus. Registration is effective after the `io.vertx.reactivex.core.eventbus.MessageConsumer#handler` method is invoked.

The consumer is unregistered from the event bus using the `io.vertx.reactivex.core.eventbus.MessageConsumer#unregister` method or by calling the `io.vertx.reactivex.core.eventbus.MessageConsumer#handler` with a null value..

NOTE: This class has been automatically generated from the io.vertx.core.eventbus.MessageConsumer non RX-ified interface using Vert.x codegen.

### Constructors

<init> | `MessageConsumer(delegate: MessageConsumer<Any>)` `MessageConsumer(delegate: MessageConsumer<Any>, typeArg_0: TypeArg<T>)`

### Properties

__TYPE_ARG | `static val __TYPE_ARG: TypeArg<MessageConsumer<Any>>`
__typeArg_0 | `val __typeArg_0: TypeArg<T>`

### Functions

address | `open fun address(): String`
bodyStream | `open fun bodyStream(): ReadStream<T>`
completionHandler | `open fun completionHandler(completionHandler: Handler<AsyncResult<Void>>): Unit` Optional method which can be called to indicate when the registration has been propagated across the cluster.
endHandler | `open fun endHandler(endHandler: Handler<Void>): MessageConsumer<T>`
equals | `open fun equals(other: Any?): Boolean`
exceptionHandler | `open fun exceptionHandler(handler: Handler<Throwable>): MessageConsumer<T>`
getDelegate | `open fun getDelegate(): MessageConsumer<Any>`
getMaxBufferedMessages | `open fun getMaxBufferedMessages(): Int`
handler | `open fun handler(handler: Handler<Message<T>>): MessageConsumer<T>`
hashCode | `open fun hashCode(): Int`
isRegistered | `open fun isRegistered(): Boolean`
newInstance | `open static fun <T : Any> newInstance(arg: MessageConsumer<Any>): MessageConsumer<T>` `open static fun <T : Any> newInstance(arg: MessageConsumer<Any>, __typeArg_T: TypeArg<T>): MessageConsumer<T>`
pause | `open fun pause(): MessageConsumer<T>`
resume | `open fun resume(): MessageConsumer<T>`
rxCompletionHandler | `open fun rxCompletionHandler(): Completable` Optional method which can be called to indicate when the registration has been propagated across the cluster.
rxUnregister | `open fun rxUnregister(): Completable` Unregisters the handler which created this registration
setMaxBufferedMessages | `open fun setMaxBufferedMessages(maxBufferedMessages: Int): MessageConsumer<T>` Set the number of messages this registration will buffer when this stream is paused. The default value is `0`. When a new value is set, buffered messages may be discarded to reach the new value.
toFlowable | `open fun toFlowable(): Flowable<Message<T>>`
toObservable | `open fun toObservable(): Observable<Message<T>>`
toString | `open fun toString(): String`
unregister | `open fun unregister(): Unit` `open fun unregister(completionHandler: Handler<AsyncResult<Void>>): Unit` Unregisters the handler which created this registration