new MessageProducer()
Represents a stream of message that can be written to.
- Source:
Methods
address() → {string}
- Source:
Returns:
The address to which the producer produces messages.
- Type
- string
close(handler)
Same as MessageProducer#close but with an
handler called when the operation completes
Parameters:
| Name | Type | Description |
|---|---|---|
handler |
function |
- Source:
deliveryOptions(options) → {MessageProducer}
Update the delivery options of this producer.
Parameters:
| Name | Type | Description |
|---|---|---|
options |
Object | the new options |
- Source:
Returns:
this producer object
- Type
- MessageProducer
drainHandler(handler) → {MessageProducer}
Parameters:
| Name | Type | Description |
|---|---|---|
handler |
function |
- Source:
Returns:
- Type
- MessageProducer
end(handler)
Closes the producer, calls MessageProducer#close
Parameters:
| Name | Type | Description |
|---|---|---|
handler |
function |
- Source:
exceptionHandler(handler) → {MessageProducer}
Parameters:
| Name | Type | Description |
|---|---|---|
handler |
function |
- Source:
Returns:
- Type
- MessageProducer
setWriteQueueMaxSize(maxSize) → {MessageProducer}
Parameters:
| Name | Type | Description |
|---|---|---|
maxSize |
number |
- Source:
Returns:
- Type
- MessageProducer
write(data, handler)
Same as but with an
handler called when the operation completes
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | |
handler |
function |
- Source:
writeQueueFull() → {boolean}
This will return
true if there are more bytes in the write queue than the value set using MessageProducer#setWriteQueueMaxSize
- Source:
Returns:
true if write queue is full
- Type
- boolean