Class: MessageConsumer

vertx-js/message_consumer~ MessageConsumer

new MessageConsumer()

Source:

Methods

address() → {string}

Source:
Returns:
The address the handler was registered with.
Type
string

bodyStream() → {ReadStream}

Source:
Returns:
a read stream for the body of the message stream.
Type
ReadStream

completionHandler(completionHandler)

Optional method which can be called to indicate when the registration has been propagated across the cluster.
Parameters:
Name Type Description
completionHandler function the completion handler
Source:

endHandler(endHandler) → {MessageConsumer}

Parameters:
Name Type Description
endHandler function
Source:
Returns:
Type
MessageConsumer

exceptionHandler(handler) → {MessageConsumer}

Parameters:
Name Type Description
handler function
Source:
Returns:
Type
MessageConsumer

getMaxBufferedMessages() → {number}

Source:
Returns:
the maximum number of messages that can be buffered when this stream is paused
Type
number

handler(handler) → {MessageConsumer}

Parameters:
Name Type Description
handler function
Source:
Returns:
Type
MessageConsumer

isRegistered() → {boolean}

Source:
Returns:
true if the current consumer is registered
Type
boolean

pause() → {MessageConsumer}

Source:
Returns:
Type
MessageConsumer

resume() → {MessageConsumer}

Source:
Returns:
Type
MessageConsumer

setMaxBufferedMessages(maxBufferedMessages) → {MessageConsumer}

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.
Parameters:
Name Type Description
maxBufferedMessages number the maximum number of messages that can be buffered
Source:
Returns:
this registration
Type
MessageConsumer

unregister(completionHandler)

Unregisters the handler which created this registration
Parameters:
Name Type Description
completionHandler function the handler called when the unregister is done. For example in a cluster when all nodes of the event bus have been unregistered.
Source: