= Distributed James Server &mdash; rabbitmq.properties
:navtitle: rabbitmq.properties

:sample-configuration-prefix-url: https://github.com/apache/james-project/blob/master/server/apps/distributed-app/sample-configuration
include::partial$configure/rabbitmq.adoc[]

== RabbitMQ MailQueue Configuration

James mail queue is a component acting like a queue where it can enqueue and dequeue mails.
Beside of the basic features, it also allows some extra operations like getting size, browsing all items in the mail queue...
One of the mailqueue implementation is using RabbitMQ.
As RabbitMQ doesn't offer enough features to implement efficiently all mailqueue operations,
this implementation relies on Cassandra.

.rabbitmq.properties content
|===
| Property name | explanation

| cassandra.view.enabled
| Whether the Cassandra administrative view should be activated. Boolean value defaulting to true.
Not necessarily needed for MDA deployments, mail queue management adds significant complexity.


| mailqueue.view.sliceWindow
| James divides the view into slices, each slice contains data for a given period, sliceWindow parameter controls this period.
This dividing of periods allows faster browsing of the mail queue. Tips for choosing sliceWindow are explained in
{sample-configuration-prefix-url}/rabbitmq.properties[rabbitmq.properties]

| mailqueue.view.bucketCount
| Mails in a mail queue are distributed across the underlying storage service.
BucketCount describes how to be distributing mails to fit with your James setup
Tips for choosing bucketCount are explained in
{sample-configuration-prefix-url}/rabbitmq.properties[rabbitmq.properties]

| mailqueue.view.updateBrowseStartPace
| To browse, James needs a starting point and to continuously update that point in runtime.
UpdateBrowseStartPace describes the probability to update the starting point.
Tips for choosing updateBrowseStartPace are explained in
{sample-configuration-prefix-url}/rabbitmq.properties[rabbitmq.properties]

| mailqueue.size.metricsEnabled
|  By default, the metrics are disabled for the mail queue size.
As computing the size of the mail queue is currently implemented on top of browse operation and thus has a linear complexity,
sometimes it can get too big, making it impossible for the ES reporter to handle it correctly without crashing.
It can be useful then to disable it.
Tips for choosing metricsEnabled are explained in
{sample-configuration-prefix-url}/rabbitmq.properties[rabbitmq.properties]

| notification.queue.ttl
| Configure queue ttl (in ms). References: https://www.rabbitmq.com/ttl.html#queue-ttl.
This is used only on queues used to share notification patterns, are exclusive to a node. If omitted, it will not add the TTL configure when declaring queues.
Optional integer, defaults is 3600000.

|===
