Rabbitmq output plugin
- A component of therabbitmq integration plugin
- Integration version: v7.4.0
- Released on: 2024-09-16
- Changelog
For other versions, see theVersioned plugin docs.
For questions about the plugin, open a topic in theDiscuss forums. For bugs or feature requests, open an issue inGithub. For the list of Elastic supported plugins, please consult theElastic Support Matrix.
Push events to a RabbitMQ exchange. Requires RabbitMQ 2.x or later version (3.x is recommended).
Relevant links:
This plugin supports the following configuration options plus theCommon options described later.
Setting | Input type | Required |
---|---|---|
arguments | array | No |
automatic_recovery | boolean | No |
connect_retry_interval | number | No |
connection_timeout | number | No |
durable | boolean | No |
exchange | string | Yes |
exchange_type | string, one of["fanout", "direct", "topic", "x-consistent-hash", "x-modulus-hash"] | Yes |
heartbeat | number | No |
host | string | Yes |
key | string | No |
message_properties | hash | No |
passive | boolean | No |
password | password | No |
persistent | boolean | No |
port | number | No |
ssl | boolean | No |
ssl_certificate_password | string | No |
ssl_certificate_path | a valid filesystem path | No |
ssl_version | string | No |
user | string | No |
vhost | string | No |
Also seeCommon options for a list of options supported by all output plugins.
- Value type isarray
- Default value is
{}
Extra queue arguments as an array. To make a RabbitMQ queue mirrored, use:{"x-ha-policy" => "all"}
- Value type isboolean
- Default value is
true
Set this to automatically recover from a broken connection. You almost certainly don’t want to override this!!!
- Value type isnumber
- Default value is
1
Time in seconds to wait before retrying a connection
- Value type isnumber
- There is no default value for this setting.
The default connection timeout in milliseconds. If not specified the timeout is infinite.
- Value type isboolean
- Default value is
true
Is this exchange durable? (aka; Should it survive a broker restart?)
- This is a required setting.
- Value type isstring
- There is no default value for this setting.
The name of the exchange
- 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)
- Value type isnumber
- There is no default value for this setting.
Heartbeat delay in seconds. If unspecified no heartbeats will be sent
- This is a required setting.
- Value type isstring
- 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.
- Value type isstring
- 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 tologstash
- Routing keys are ignored on fanout exchanges.
- Value type ishash
- Default value is
{}
Add properties to be set per-message here, such ascontent_type,priority. Values can besprintf
templates, whose value for each message will be populated from the event.
Example:
message_properties => { "content_type" => "application/json" "priority" => 1}
- Value type isboolean
- Default value is
false
Passive queue creation? Useful for checking queue existance without modifying server state
- Value type ispassword
- Default value is
"guest"
RabbitMQ password
- Value type isboolean
- Default value is
true
Should RabbitMQ persist messages to disk?
- Value type isnumber
- Default value is
5672
RabbitMQ port to connect on
- Value type isboolean
- 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
- Value type isstring
- There is no default value for this setting.
Password for the encrypted PKCS12 (.p12) certificate file specified in ssl_certificate_path
- Value type ispath
- There is no default value for this setting.
Path to an SSL certificate in PKCS12 (.p12) format used for verifying the remote host
- Value type isstring
- Default value is
"TLSv1.2"
Version of the SSL protocol to use.
- Value type isstring
- Default value is
"guest"
RabbitMQ username
- Value type isstring
- 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.
These configuration options are supported by all output plugins:
- Value type iscodec
- Default value is
"json"
The codec used for output data. Output codecs are a convenient method for encoding your data before it leaves the output without needing a separate filter in your Logstash pipeline.
- Value type isboolean
- Default value is
true
Disable or enable metric logging for this specific plugin instance. By default we record all the metrics we can, but you can disable metrics collection for a specific plugin.
- Value type isstring
- There is no default value for this setting.
Add a uniqueID
to the plugin configuration. If no ID is specified, Logstash will generate one. It is strongly recommended to set this ID in your configuration. This is particularly useful when you have two or more plugins of the same type. For example, if you have 2 rabbitmq outputs. Adding a named ID in this case will help in monitoring Logstash when using the monitoring APIs.
output { rabbitmq { id => "my_plugin_id" }}
Variable substitution in theid
field only supports environment variables and does not support the use of values from the secret store.