# Class: MessageProducer

## vertx-js/message_producer~ MessageProducer

#### new MessageProducer()

Represents a stream of message that can be written to.

Source:
  - vertx-js/message_producer.js, line 33

### Methods

#### address() → {string}

Source:
  - vertx-js/message_producer.js, line 170

##### Returns:

- The address to which the producer produces messages.
- Type
    string

#### close()

Closes the producer, this method should be called when the message producer is not used anymore.

Source:
  - vertx-js/message_producer.js, line 183

#### deliveryOptions(options) → {MessageProducer}

Update the delivery options of this producer.

##### Parameters:

Name | Type | Description
--- | --- | ---
`options` | Object | the new options

Source:
  - vertx-js/message_producer.js, line 155

##### Returns:

this producer object

Type
  MessageProducer

#### drainHandler(handler) → {MessageProducer}

##### Parameters:

Name | Type | Description
--- | --- | ---
`handler` | function |

Source:
  - vertx-js/message_producer.js, line 140

##### Returns:

Type
  MessageProducer

#### end(t)

Same as MessageProducer#end but writes some data to the stream before ending.

##### Parameters:

Name | Type | Description
--- | --- | ---
`t` | Object |

Source:
  - vertx-js/message_producer.js, line 45

#### exceptionHandler(handler) → {MessageProducer}

##### Parameters:

Name | Type | Description
--- | --- | ---
`handler` | function |

Source:
  - vertx-js/message_producer.js, line 96

##### Returns:

Type
  MessageProducer

#### send(message, replyHandler) → {MessageProducer}

##### Parameters:

Name | Type | Description
--- | --- | ---
`message` | Object |
`replyHandler` | function |

Source:
  - vertx-js/message_producer.js, line 75

##### Returns:

Type
  MessageProducer

#### setWriteQueueMaxSize(maxSize) → {MessageProducer}

##### Parameters:

Name | Type | Description
--- | --- | ---
`maxSize` | number |

Source:
  - vertx-js/message_producer.js, line 126

##### Returns:

Type
  MessageProducer

#### write(data) → {MessageProducer}

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | Object |

Source:
  - vertx-js/message_producer.js, line 112

##### Returns:

Type
  MessageProducer

#### writeQueueFull() → {boolean}

This will return `true` if there are more bytes in the write queue than the value set using MessageProducer#setWriteQueueMaxSize

Source:
  - vertx-js/message_producer.js, line 61

##### Returns:

true if write queue is full

Type
  boolean