An event bus consumer object representing a stream of message to an @see \io\vertx\jphp\core\eventbus\EventBus address that can be read from.
The @see \io\vertx\jphp\core\eventbus\EventBus::consumer or @see \io\vertx\jphp\core\eventbus\EventBus::localConsumer creates a new consumer, the returned consumer is not yet registered against the event bus. Registration is effective after the @see \io\vertx\jphp\core\eventbus\MessageConsumer::handler method is invoked.
The consumer is unregistered from the event bus using the @see \io\vertx\jphp\core\eventbus\MessageConsumer::unregister method or by calling the
see |
with a null value.. |
---|---|
package |
Default |
__construct()
address() : string
string
The address the handler was registered with.
bodyStream() : \io\vertx\jphp\core\eventbus\ReadStream<T>
\io\vertx\jphp\core\eventbus\ReadStream
a read stream for the body of the message stream.
completionHandler( $arg0) : void
callable
endHandler( $arg0) : $this
callable
$this
exceptionHandler( $arg0) : $this
callable
$this
fetch( $arg0) : $this
integer
$this
getMaxBufferedMessages() : integer
integer
the maximum number of messages that can be buffered when this stream is paused
handler( $arg0) : $this
callable
$this
isRegistered() : boolean
boolean
true if the current consumer is registered
pause() : $this
$this
resume() : $this
$this
setMaxBufferedMessages( $arg0) : \io\vertx\jphp\core\eventbus\MessageConsumer<T>
When a new value is set, buffered messages may be discarded to reach the new value. The most recent messages will be kept.
integer
\io\vertx\jphp\core\eventbus\MessageConsumer
this registration
unregister( $arg0 = null) : void
unregister()
Unregisters the handler which created this registration
param $completionHandler [callable] the handler called when the unregister is done. For example in a cluster when all nodes of the event bus have been unregistered. unregister($completionHandler)
callable