:plugin: rabbitmq
:type: output

///////////////////////////////////////////
START - GENERATED VARIABLES, DO NOT EDIT!
///////////////////////////////////////////
:version: %VERSION%
:release_date: %RELEASE_DATE%
:changelog_url: %CHANGELOG_URL%
:include_path: ../../../../logstash/docs/include
///////////////////////////////////////////
END - GENERATED VARIABLES, DO NOT EDIT!
///////////////////////////////////////////

[id="plugins-{type}s-{plugin}"]

=== Rabbitmq output plugin

include::{include_path}/plugin_header.asciidoc[]

==== Description

Push events to a RabbitMQ exchange. Requires RabbitMQ 2.x
or later version (3.x is recommended).

Relevant links:

* http://www.rabbitmq.com/[RabbitMQ]
* http://rubymarchhare.info[March Hare]

[id="plugins-{type}s-{plugin}-options"]
==== Rabbitmq Output Configuration Options

This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.

[cols="<,<,<",options="header",]
|=======================================================================
|Setting |Input type|Required
| <<plugins-{type}s-{plugin}-arguments>> |<<array,array>>|No
| <<plugins-{type}s-{plugin}-automatic_recovery>> |<<boolean,boolean>>|No
| <<plugins-{type}s-{plugin}-connect_retry_interval>> |<<number,number>>|No
| <<plugins-{type}s-{plugin}-connection_timeout>> |<<number,number>>|No
| <<plugins-{type}s-{plugin}-durable>> |<<boolean,boolean>>|No
| <<plugins-{type}s-{plugin}-exchange>> |<<string,string>>|Yes
| <<plugins-{type}s-{plugin}-exchange_type>> |<<string,string>>, one of `["fanout", "direct", "topic", "x-consistent-hash", "x-modulus-hash"]`|Yes
| <<plugins-{type}s-{plugin}-heartbeat>> |<<number,number>>|No
| <<plugins-{type}s-{plugin}-host>> |<<string,string>>|Yes
| <<plugins-{type}s-{plugin}-key>> |<<string,string>>|No
| <<plugins-{type}s-{plugin}-message_properties>> |<<hash,hash>>|No
| <<plugins-{type}s-{plugin}-passive>> |<<boolean,boolean>>|No
| <<plugins-{type}s-{plugin}-password>> |<<password,password>>|No
| <<plugins-{type}s-{plugin}-persistent>> |<<boolean,boolean>>|No
| <<plugins-{type}s-{plugin}-port>> |<<number,number>>|No
| <<plugins-{type}s-{plugin}-ssl>> |<<boolean,boolean>>|No
| <<plugins-{type}s-{plugin}-ssl_certificate_password>> |<<string,string>>|No
| <<plugins-{type}s-{plugin}-ssl_certificate_path>> |a valid filesystem path|No
| <<plugins-{type}s-{plugin}-ssl_version>> |<<string,string>>|No
| <<plugins-{type}s-{plugin}-user>> |<<string,string>>|No
| <<plugins-{type}s-{plugin}-vhost>> |<<string,string>>|No
|=======================================================================

Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
output plugins.

&nbsp;

[id="plugins-{type}s-{plugin}-arguments"]
===== `arguments` 

  * Value type is <<array,array>>
  * Default value is `{}`

Extra queue arguments as an array.
To make a RabbitMQ queue mirrored, use: `{"x-ha-policy" => "all"}`

[id="plugins-{type}s-{plugin}-automatic_recovery"]
===== `automatic_recovery` 

  * Value type is <<boolean,boolean>>
  * Default value is `true`

Set this to automatically recover from a broken connection. You almost certainly don't want to override this!!!

[id="plugins-{type}s-{plugin}-connect_retry_interval"]
===== `connect_retry_interval` 

  * Value type is <<number,number>>
  * Default value is `1`

Time in seconds to wait before retrying a connection

[id="plugins-{type}s-{plugin}-connection_timeout"]
===== `connection_timeout` 

  * Value type is <<number,number>>
  * There is no default value for this setting.

The default connection timeout in milliseconds. If not specified the timeout is infinite.

[id="plugins-{type}s-{plugin}-debug"]
===== `debug`  (DEPRECATED)

  * DEPRECATED WARNING: This configuration item is deprecated and may not be available in future versions.
  * Value type is <<boolean,boolean>>
  * Default value is `false`

Enable or disable logging

[id="plugins-{type}s-{plugin}-durable"]
===== `durable` 

  * Value type is <<boolean,boolean>>
  * Default value is `true`

Is this exchange durable? (aka; Should it survive a broker restart?)

[id="plugins-{type}s-{plugin}-exchange"]
===== `exchange` 

  * This is a required setting.
  * Value type is <<string,string>>
  * There is no default value for this setting.

The name of the exchange

[id="plugins-{type}s-{plugin}-exchange_type"]
===== `exchange_type` 

  * This is a required setting.
  * Value can be any of: `fanout`, `direct`, `topic`, `x-consistent-hash`, `x-modulus-hash`
  * There is no default value for this setting.

The exchange type (fanout, topic, direct)

[id="plugins-{type}s-{plugin}-heartbeat"]
===== `heartbeat` 

  * Value type is <<number,number>>
  * There is no default value for this setting.

Heartbeat delay in seconds. If unspecified no heartbeats will be sent

[id="plugins-{type}s-{plugin}-host"]
===== `host` 

  * This is a required setting.
  * Value type is <<string,string>>
  * There is no default value for this setting.

Common functionality for the rabbitmq input/output
RabbitMQ server address(es)
host can either be a single host, or a list of hosts
i.e.
  host => "localhost"
or
  host => ["host01", "host02]

if multiple hosts are provided on the initial connection and any subsequent
recovery attempts of the hosts is chosen at random and connected to.
Note that only one host connection is active at a time.

[id="plugins-{type}s-{plugin}-key"]
===== `key` 

  * Value type is <<string,string>>
  * Default value is `"logstash"`

The default codec for this plugin is JSON. You can override this to suit your particular needs however.
Key to route to by default. Defaults to 'logstash'

* Routing keys are ignored on fanout exchanges.

[id="plugins-{type}s-{plugin}-message_properties"]
===== `message_properties`

  * Value type is <<hash,hash>>
  * Default value is `{}`

Add properties to be set per-message here, such as 'Content-Type', 'Priority'

Example:
[source,ruby]
    message_properties => { "priority" => "1" }


[id="plugins-{type}s-{plugin}-passive"]
===== `passive` 

  * Value type is <<boolean,boolean>>
  * Default value is `false`

Passive queue creation? Useful for checking queue existance without modifying server state

[id="plugins-{type}s-{plugin}-password"]
===== `password` 

  * Value type is <<password,password>>
  * Default value is `"guest"`

RabbitMQ password

[id="plugins-{type}s-{plugin}-persistent"]
===== `persistent` 

  * Value type is <<boolean,boolean>>
  * Default value is `true`

Should RabbitMQ persist messages to disk?

[id="plugins-{type}s-{plugin}-port"]
===== `port` 

  * Value type is <<number,number>>
  * Default value is `5672`

RabbitMQ port to connect on

[id="plugins-{type}s-{plugin}-ssl"]
===== `ssl` 

  * Value type is <<boolean,boolean>>
  * There is no default value for this setting.

Enable or disable SSL.
Note that by default remote certificate verification is off.
Specify ssl_certificate_path and ssl_certificate_password if you need
certificate verification

[id="plugins-{type}s-{plugin}-ssl_certificate_password"]
===== `ssl_certificate_password` 

  * Value type is <<string,string>>
  * There is no default value for this setting.

Password for the encrypted PKCS12 (.p12) certificate file specified in ssl_certificate_path

[id="plugins-{type}s-{plugin}-ssl_certificate_path"]
===== `ssl_certificate_path` 

  * Value type is <<path,path>>
  * There is no default value for this setting.

Path to an SSL certificate in PKCS12 (.p12) format used for verifying the remote host

[id="plugins-{type}s-{plugin}-ssl_version"]
===== `ssl_version` 

  * Value type is <<string,string>>
  * Default value is `"TLSv1.2"`

Version of the SSL protocol to use.

[id="plugins-{type}s-{plugin}-tls_certificate_password"]
===== `tls_certificate_password`  (DEPRECATED)

  * DEPRECATED WARNING: This configuration item is deprecated and may not be available in future versions.
  * Value type is <<string,string>>
  * There is no default value for this setting.

TLS certificate password

[id="plugins-{type}s-{plugin}-tls_certificate_path"]
===== `tls_certificate_path`  (DEPRECATED)

  * DEPRECATED WARNING: This configuration item is deprecated and may not be available in future versions.
  * Value type is <<path,path>>
  * There is no default value for this setting.

TLS certifcate path

[id="plugins-{type}s-{plugin}-user"]
===== `user` 

  * Value type is <<string,string>>
  * Default value is `"guest"`

RabbitMQ username

[id="plugins-{type}s-{plugin}-vhost"]
===== `vhost` 

  * Value type is <<string,string>>
  * Default value is `"/"`

The vhost (virtual host) to use. If you don't know what this
is, leave the default. With the exception of the default
vhost ("/"), names of vhosts should not begin with a forward
slash.



[id="plugins-{type}s-{plugin}-common-options"]
include::{include_path}/{type}.asciidoc[]