Some parameters can be configured using config files.
To setup a publisher that just publish stream events to a specific exchange on a specifc RabbitMQ host you create a config file at $site_path/data/@PLUGIN@/site
. File extension must be .config
. Connection to RabbitMQ will be established for each files. If no config files are located in this directory no connection with this type of publisher will be established.
If @PLUGIN@.config
exists in $site_path/data/@PLUGIN@
, it is loaded at first. It means that this is default for all config files, including the events-broker API config file.
To make specific configurations for the events-broker API you do those in $site_path/data/@PLUGIN@/broker/broker.config
. You can use the same configuration options as the other configs with the additions of queuePrefix, durable, exclusive and autoDelete that decides queue properties and consumerPrefetch that is a channel property related to consumers. The event-broker API use its own publisher that is separate from the previously mentioned publisher.
If amqp..password is specified in $site_path/etc/secure.config
. This password is used when trying to connect to amqp with username = .
[amqp "guest"] password = guest
[amqp] uri = amqp://localhost username = guest password = guest [exchange] name = exchange-for-gerrit-queue [message] deliveryMode = 1 priority = 0 routingKey = com.foobar.www.gerrit [gerrit] name = foobar-gerrit hostname = www.foobar.com scheme = ssh port = 29418 listenAs = gerrituser [monitor] interval = 15000 failureCount = 15
amqp.uri
amqp.username
amqp.password
amqp.queuePrefix
amqp.durable
amqp.queuePrefix
is specified.amqp.exclusive
amqp.queuePrefix
is specified.amqp.autoDelete
amqp.queuePrefix
is specified.amqp.consumerPrefetch
exchange.name
general.publishAllGerritEvents
general.enableBrokerApi
message.deliveryMode
message.priority
message.routingKey
message.publishConfirm
gerrit.name
gerrit.hostname
gerrit.scheme
gerrit.port
gerrit.listenAs
monitor.interval
monitor.failureCount
You can change the below values by specifying them in config file.
Bold is String value.
name | value |
---|---|
amqp.uri | amqp://localhost |
amqp.username | guest |
amqp.password | guest |
exchange.name | gerrit.publish |
message.deliveryMode | 1 |
message.priority | 0 |
message.routingKey | event.type |
gerrit.name | Empty |
gerrit.hostname | Empty |
gerrit.scheme | ssh |
gerrit.port | 29418 |
gerrit.listenAs | Unrestricted user |
monitor.interval | 15000 |
monitor.failureCount | 15 |