An event bus consumer object representing a stream of message to an EventBus address that can be read from.
The consumer or localConsumer creates a new consumer, the returned consumer is not yet registered against the event bus. Registration is effective after the handler method is invoked.
The consumer is unregistered from the event bus using the unregister method or by calling the handler with a null value..
Anything
MessageConsumer
Basic
Identifiable
Object
Anything
no subtypes hierarchy
Initializer |
MessageConsumer(MessageConsumer<out Object> unknown) |
Inherited Attributes |
Attributes inherited from: Object hash , string |
Methods | |
address | shared default String address() |
bodyStream | shared default ReadStream<T> bodyStream() |
completionHandler | shared default void completionHandler(Anything(Throwable?) completionHandler) Optional method which can be called to indicate when the registration has been propagated across the cluster. Parameters:
|
endHandler | shared actual default MessageConsumer<T> endHandler(Anything()? endHandler) Set an end handler. Once the stream has ended, and there is no more data to be read, this handler will be called. Refines ReadStream.endHandler |
exceptionHandler | shared actual default MessageConsumer<T> exceptionHandler(Anything(Throwable)? handler) Set an exception handler. Refines StreamBase.exceptionHandler |
getMaxBufferedMessages | shared default Integer getMaxBufferedMessages() |
handler | shared actual default MessageConsumer<T> handler(Anything(Message<T>)? handler) Set a data handler. As data is read, the handler will be called with the data. Refines ReadStream.handler |
isRegistered | shared default Boolean isRegistered() |
pause | shared actual default MessageConsumer<T> pause() Pause the Refines ReadStream.pause |
resume | shared actual default MessageConsumer<T> resume() Resume reading. If the Refines ReadStream.resume |
setMaxBufferedMessages | shared default MessageConsumer<T> setMaxBufferedMessages(Integer maxBufferedMessages) Set the number of messages this registration will buffer when this stream is paused. The default
value is Parameters:
|
unregister | shared default void unregister() Unregisters the handler which created this registration |
unregister | shared default void unregister(Anything(Throwable?) completionHandler) Unregisters the handler which created this registration Parameters:
|
Inherited Methods |
Methods inherited from: Object equals |
Methods inherited from: ReadStream<T> |
Methods inherited from: StreamBase |