You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Felix Auringer <fe...@giz.berlin> on 2026/09/16 06:53:53 UTC
Email Queues in James
Hello together,
I have some questions regarding the email queues in James.
As far as I understand, there are two processes where an email queue is necessary, receiving email and sending email.
In my head, the ideal process for these processes looks like this:
- After the client has sent all commands, the email is put in a queue (spool / outgoing).
- If and only if the queue operation succeeded, James tells the client that its email was received successfully.
- The spooler/deliverer takes an email from the queue and processes it (mailetcontainer / remote delivery).
- If and only if the email processing was successful (persisted in mailbox/accepted by remote server), the email is removed from the queue.
If I understand the James code correctly (please correct me if I'm wrong), the processors completely take emails out of the queue (meaning they only exist in memory?) and reinsert them later if necessary.
This would mean that a crash / server restart while an email is processed would mean that the email is lost with no possibility of informing the client. Can I do something about that?
According to the docs (and logs during startup), James uses two different message queues:
- ActiveMQ (https://james.apache.org/server/config-activemq.html): Manages at least the queues 'spool' and 'outgoing' according to the docs. According to my logs, it uses KahaDB as persistence adapter.
- RabbitMQ (https://james.apache.org/server/config-rabbitmq.html): Used for distributed MailQueue and distributed event system according to the docs. It is also running in my single node deployment (as in-memory version because I did not configure anything).
Which of them is used for the processes described above?
Can I configure persistence for the email queues? I would like to have a system which I can restart while emails are queued without them getting lost.
Best regards,
Felix
---
Gesellschaft für interkulturelles
Zusammenleben gGmbH (GIZ)
Felix Auringer
IT
Reformationsplatz 2
13597 Berlin
Tel: 030/513 0100 00; Fax: 030/513 0100 09
www.giz.berlin; felix.auringer@giz.berlin
Amtsgericht Charlottenburg HRB 200872 B
Geschäftsführerin: Dr. Britta Marschke
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re[2]: Email Queues in James
Posted by Терсков Иль я Андреевич <i....@kps-t.ru>.
I just want Artemis instead of activemq or even without spooler (or in
memory/direct) for fever and more minimal build. I even thinking about
use dovecot as imap and connect with proxy/sasl to james as smtp server.
I dont sure about how james stable with big data in database while
dovecote is rock solid.
С уважением,
Руководитель ИТ
ООО «КПС-Технологии»
Терсков Илья Андреевич
Моб.: +7 (996) 415-16-29
E-mail:i.terskov@kps-t.ru
УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ:
Это электронное сообщение и любые документы, приложенные к нему,
содержат
конфиденциальную информацию. Настоящим уведомляем Вас, что если это
сообщение
не предназначено Вам, использование, копирование и распространение
информации,
содержащейся в настоящем сообщении, а также осуществление любых действий
на
основе этой информации строго запрещено. Если Вы получили это сообщение
по
ошибке, пожалуйста, сообщите об этом отправителю по электронной почте и
удалите данное сообщение.
CONFIDENTIALITY NOTICE:
This email and any files attached to it are confidential. If you are not
the
intended recipient, you are notified that using, copying, distributing,
or taking
any action in reliance on the contents of this information is strictly
prohibited.
If you have received this email in error, please notify the sender and
delete this
message.
------ Исходное сообщение ------
От "Felix Auringer" <fe...@giz.berlin>
Кому server-user@james.apache.org
Дата 17.09.2026 13:47:53
Тема Re: Email Queues in James
>Hey,
>
>as far as I understood the data flows as following:
>
>- SMTP between client and James
>- As soon as client ends the DATA command, James runs its SMTP hooks, puts the email in its incoming queue (spool) and returns success to the client
>- At this point, the client has received success but the email is not yet in the final persistent storage (e.g. database), only in the (persisted) spool
>- James copies the email out of the spool and processes it with the mailetcontainer
>- If the process is successful, the LocalDelivery Mailet puts the email in the final persistent storage (e.g. database) and removes the email from the spool
>
>This is probably configurable but I think my description above is accurate for the "normal" configurations using the NoAuthCmdHandlerLoader or the CoreCmdHandlerLoader (see https://github.com/apache/james-project/blob/b3a6cae131a2b2cb3813ab2fe6877633caba674b/server/apps/postgres-app/sample-configuration/smtpserver.xml#L58).
>Both are using the SendMailHandler which spools the email but does not persist it in the database.
>I think there is an LMTP handler that directly stores an email to persistent storage but I do not think that this is a good idea for emails originating from the internet.
>
>Best regards,
>Felix
>
>On 17/09/2026 06.02, Терсков Илья Андреевич wrote:
>>Hi everyone,
>>Since there is such a lively discussion going on, I wanted to jump in with a quick question related to the topic.
>>Doesn't the database itself handle data persistence? Is it possible to drop ActiveMQ, switch to the MemoryMailQueueModule (from memory-app), and rely on the database (like H2, for example) to guarantee persistence instead?
>>Thanks in advance for your insights!
>>
>>С уважением,
>>Руководитель ИТ
>>ООО «КПС-Технологии»
>>Терсков Илья Андреевич
>>Моб.: +7 (996) 415-16-29
>>E-mail:i.terskov@kps-t.ru
>>
>>УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ:
>>Это электронное сообщение и любые документы, приложенные к нему, содержат
>>конфиденциальную информацию. Настоящим уведомляем Вас, что если это сообщение
>>не предназначено Вам, использование, копирование и распространение информации,
>>содержащейся в настоящем сообщении, а также осуществление любых действий на
>>основе этой информации строго запрещено. Если Вы получили это сообщение по
>>ошибке, пожалуйста, сообщите об этом отправителю по электронной почте и
>>удалите данное сообщение.
>>
>>CONFIDENTIALITY NOTICE:
>>This email and any files attached to it are confidential. If you are not the
>>intended recipient, you are notified that using, copying, distributing, or taking
>>any action in reliance on the contents of this information is strictly prohibited.
>>If you have received this email in error, please notify the sender and delete this
>>message.
>>
>>
>>------ Исходное сообщение ------
>>От "Quan tran hong" <qu...@gmail.com>
>>Кому "James Users List" <se...@james.apache.org>
>>Дата 17.09.2026 9:59:35
>>Тема Re: Email Queues in James
>>
>>>Hi Felix,
>>>
>>>> Do you know for which queues ActiveMQ and for which RabbitMQ is used?
>>>
>>>Actually, it is weird to mix the use of both. It should usually be either
>>>one of them. Can I know which James app you are using?
>>>
>>>> Do I have to configure a dedicated RabbitMQ server for persistence?
>>>
>>>I think you can still have persistence with ActiveMQ.
>>>
>>>> My deployment currently uses an in-memory RabbitMQ which does not have
>>>persistence, I guess.
>>>
>>>The "in-memory RabbitMQ" term seems weird to me.
>>>
>>>> Is there documentation anywhere on how to configure the queues for
>>>persistence?
>>>
>>>Just make sure your ActiveMQ/RabbitMQ data is persisted is ok.
>>>e.g. for ActiveMQ: `var/store/activemq/` (Relative to James’s working
>>>directory)
>>>e.g. for RabbitMQ: `/var/lib/rabbitmq/`
>>>
>>>Quan
>>>
>>>On Wed, Sep 16, 2026 at 4:46 PM Felix Auringer <fe...@giz.berlin>
>>>wrote:
>>>
>>>> Hi Quan,
>>>>
>>>> thanks for your reply!
>>>> Good to know that I misunderstood the dequeuing in the code and it
>>>> actually works like I would like.
>>>> Do you know for which queues ActiveMQ and for which RabbitMQ is used?
>>>> Do I have to configure a dedicated RabbitMQ server for persistence? My
>>>> deployment currently uses an in-memory RabbitMQ which does not have
>>>> persistence, I guess.
>>>> Is there documentation anywhere on how to configure the queues for
>>>> persistence?
>>>>
>>>> Best regards,
>>>> Felix
>>>>
>>>> On 16/09/2026 11.30, Quan tran hong wrote:
>>>> > Hi Felix,
>>>> >
>>>> >> If I understand the James code correctly (please correct me if I'm
>>>> > wrong), the processors completely take emails out of the queue (meaning
>>>> > they only exist in memory?) and reinsert them later if necessary.
>>>> > This would mean that a crash / server restart while an email is processed
>>>> > would mean that the email is lost with no possibility of informing the
>>>> > client. Can I do something about that?
>>>> >
>>>> > Dequeueing does not permanently remove a mail from the mail queue (yet).
>>>> > James keeps it unacknowledged while processing it and
>>>> commits/acknowledges
>>>> > it; failures cause rollback/nack and redelivery by RabbitMQ. A James
>>>> > restart during processing, therefore, would not cause message loss.
>>>> >
>>>> >> Can I configure persistence for the email queues? I would like to have a
>>>> > system which I can restart while emails are queued without them getting
>>>> > lost.
>>>> >
>>>> > I think for RabbitMQ, James set those mail queues to be *durable*
>>>> already.
>>>> > You just need to make sure your RabbitMQ data path is persisted (in case
>>>> > you use Docker).
>>>> >
>>>> > I hope it helps.
>>>> >
>>>> > Regards,
>>>> > Quan
>>>> >
>>>> > On Wed, Sep 16, 2026 at 1:54 PM Felix Auringer <felix.auringer@giz.berlin
>>>> >
>>>> > wrote:
>>>> >
>>>> >> Hello together,
>>>> >>
>>>> >> I have some questions regarding the email queues in James.
>>>> >>
>>>> >> As far as I understand, there are two processes where an email queue is
>>>> >> necessary, receiving email and sending email.
>>>> >> In my head, the ideal process for these processes looks like this:
>>>> >>
>>>> >> - After the client has sent all commands, the email is put in a queue
>>>> >> (spool / outgoing).
>>>> >> - If and only if the queue operation succeeded, James tells the client
>>>> >> that its email was received successfully.
>>>> >> - The spooler/deliverer takes an email from the queue and processes it
>>>> >> (mailetcontainer / remote delivery).
>>>> >> - If and only if the email processing was successful (persisted in
>>>> >> mailbox/accepted by remote server), the email is removed from the queue.
>>>> >>
>>>> >> If I understand the James code correctly (please correct me if I'm
>>>> wrong),
>>>> >> the processors completely take emails out of the queue (meaning they
>>>> only
>>>> >> exist in memory?) and reinsert them later if necessary.
>>>> >> This would mean that a crash / server restart while an email is
>>>> processed
>>>> >> would mean that the email is lost with no possibility of informing the
>>>> >> client. Can I do something about that?
>>>> >>
>>>> >> According to the docs (and logs during startup), James uses two
>>>> different
>>>> >> message queues:
>>>> >>
>>>> >> - ActiveMQ (https://james.apache.org/server/config-activemq.html):
>>>> >> Manages at least the queues 'spool' and 'outgoing' according to the
>>>> docs.
>>>> >> According to my logs, it uses KahaDB as persistence adapter.
>>>> >> - RabbitMQ (https://james.apache.org/server/config-rabbitmq.html): Used
>>>> >> for distributed MailQueue and distributed event system according to the
>>>> >> docs. It is also running in my single node deployment (as in-memory
>>>> version
>>>> >> because I did not configure anything).
>>>> >>
>>>> >> Which of them is used for the processes described above?
>>>> >> Can I configure persistence for the email queues? I would like to have a
>>>> >> system which I can restart while emails are queued without them getting
>>>> >> lost.
>>>> >>
>>>> >> Best regards,
>>>> >> Felix
>>>> >> ---
>>>> >> Gesellschaft für interkulturelles
>>>> >> Zusammenleben gGmbH (GIZ)
>>>> >> Felix Auringer
>>>> >> IT
>>>> >> Reformationsplatz 2
>>>> >> 13597 Berlin
>>>> >>
>>>> >> Tel: 030/513 0100 00; Fax: 030/513 0100 09
>>>> >> www.giz.berlin;felix.auringer@giz.berlin
>>>> >>
>>>> >> Amtsgericht Charlottenburg HRB 200872 B
>>>> >> Geschäftsführerin: Dr. Britta Marschke
>>>> >>
>>>> >> ---------------------------------------------------------------------
>>>> >> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>> >> For additional commands, e-mail: server-user-help@james.apache.org
>>>> >>
>>>> >>
>>>> >
>>>>
>>>> ---
>>>> Gesellschaft für interkulturelles
>>>> Zusammenleben gGmbH (GIZ)
>>>> Felix Auringer
>>>> IT
>>>> Reformationsplatz 2
>>>> 13597 Berlin
>>>>
>>>> Tel: 030/513 0100 00; Fax: 030/513 0100 09
>>>>www.giz.berlin;felix.auringer@giz.berlin
>>>>
>>>> Amtsgericht Charlottenburg HRB 200872 B
>>>> Geschäftsführerin: Dr. Britta Marschke
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>
>>>>
>>
>
>---
>Gesellschaft für interkulturelles
>Zusammenleben gGmbH (GIZ)
>Felix Auringer
>IT
>Reformationsplatz 2
>13597 Berlin
>
>Tel: 030/513 0100 00; Fax: 030/513 0100 09 www.giz.berlin;felix.auringer@giz.berlin
>
>Amtsgericht Charlottenburg HRB 200872 B
>Geschäftsführerin: Dr. Britta Marschke
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>For additional commands, e-mail: server-user-help@james.apache.org
Re: Email Queues in James
Posted by Felix Auringer <fe...@giz.berlin>.
Hey,
as far as I understood the data flows as following:
- SMTP between client and James
- As soon as client ends the DATA command, James runs its SMTP hooks, puts the email in its incoming queue (spool) and returns success to the client
- At this point, the client has received success but the email is not yet in the final persistent storage (e.g. database), only in the (persisted) spool
- James copies the email out of the spool and processes it with the mailetcontainer
- If the process is successful, the LocalDelivery Mailet puts the email in the final persistent storage (e.g. database) and removes the email from the spool
This is probably configurable but I think my description above is accurate for the "normal" configurations using the NoAuthCmdHandlerLoader or the CoreCmdHandlerLoader (see https://github.com/apache/james-project/blob/b3a6cae131a2b2cb3813ab2fe6877633caba674b/server/apps/postgres-app/sample-configuration/smtpserver.xml#L58).
Both are using the SendMailHandler which spools the email but does not persist it in the database.
I think there is an LMTP handler that directly stores an email to persistent storage but I do not think that this is a good idea for emails originating from the internet.
Best regards,
Felix
On 17/09/2026 06.02, Терсков Илья Андреевич wrote:
> Hi everyone,
> Since there is such a lively discussion going on, I wanted to jump in with a quick question related to the topic.
> Doesn't the database itself handle data persistence? Is it possible to drop ActiveMQ, switch to the MemoryMailQueueModule (from memory-app), and rely on the database (like H2, for example) to guarantee persistence instead?
> Thanks in advance for your insights!
>
> С уважением,
> Руководитель ИТ
> ООО «КПС-Технологии»
> Терсков Илья Андреевич
> Моб.: +7 (996) 415-16-29
> E-mail:i.terskov@kps-t.ru
>
> УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ:
> Это электронное сообщение и любые документы, приложенные к нему, содержат
> конфиденциальную информацию. Настоящим уведомляем Вас, что если это сообщение
> не предназначено Вам, использование, копирование и распространение информации,
> содержащейся в настоящем сообщении, а также осуществление любых действий на
> основе этой информации строго запрещено. Если Вы получили это сообщение по
> ошибке, пожалуйста, сообщите об этом отправителю по электронной почте и
> удалите данное сообщение.
>
> CONFIDENTIALITY NOTICE:
> This email and any files attached to it are confidential. If you are not the
> intended recipient, you are notified that using, copying, distributing, or taking
> any action in reliance on the contents of this information is strictly prohibited.
> If you have received this email in error, please notify the sender and delete this
> message.
>
>
> ------ Исходное сообщение ------
> От "Quan tran hong" <qu...@gmail.com>
> Кому "James Users List" <se...@james.apache.org>
> Дата 17.09.2026 9:59:35
> Тема Re: Email Queues in James
>
>> Hi Felix,
>>
>>> Do you know for which queues ActiveMQ and for which RabbitMQ is used?
>>
>> Actually, it is weird to mix the use of both. It should usually be either
>> one of them. Can I know which James app you are using?
>>
>>> Do I have to configure a dedicated RabbitMQ server for persistence?
>>
>> I think you can still have persistence with ActiveMQ.
>>
>>> My deployment currently uses an in-memory RabbitMQ which does not have
>> persistence, I guess.
>>
>> The "in-memory RabbitMQ" term seems weird to me.
>>
>>> Is there documentation anywhere on how to configure the queues for
>> persistence?
>>
>> Just make sure your ActiveMQ/RabbitMQ data is persisted is ok.
>> e.g. for ActiveMQ: `var/store/activemq/` (Relative to James’s working
>> directory)
>> e.g. for RabbitMQ: `/var/lib/rabbitmq/`
>>
>> Quan
>>
>> On Wed, Sep 16, 2026 at 4:46 PM Felix Auringer <fe...@giz.berlin>
>> wrote:
>>
>>> Hi Quan,
>>>
>>> thanks for your reply!
>>> Good to know that I misunderstood the dequeuing in the code and it
>>> actually works like I would like.
>>> Do you know for which queues ActiveMQ and for which RabbitMQ is used?
>>> Do I have to configure a dedicated RabbitMQ server for persistence? My
>>> deployment currently uses an in-memory RabbitMQ which does not have
>>> persistence, I guess.
>>> Is there documentation anywhere on how to configure the queues for
>>> persistence?
>>>
>>> Best regards,
>>> Felix
>>>
>>> On 16/09/2026 11.30, Quan tran hong wrote:
>>> > Hi Felix,
>>> >
>>> >> If I understand the James code correctly (please correct me if I'm
>>> > wrong), the processors completely take emails out of the queue (meaning
>>> > they only exist in memory?) and reinsert them later if necessary.
>>> > This would mean that a crash / server restart while an email is processed
>>> > would mean that the email is lost with no possibility of informing the
>>> > client. Can I do something about that?
>>> >
>>> > Dequeueing does not permanently remove a mail from the mail queue (yet).
>>> > James keeps it unacknowledged while processing it and
>>> commits/acknowledges
>>> > it; failures cause rollback/nack and redelivery by RabbitMQ. A James
>>> > restart during processing, therefore, would not cause message loss.
>>> >
>>> >> Can I configure persistence for the email queues? I would like to have a
>>> > system which I can restart while emails are queued without them getting
>>> > lost.
>>> >
>>> > I think for RabbitMQ, James set those mail queues to be *durable*
>>> already.
>>> > You just need to make sure your RabbitMQ data path is persisted (in case
>>> > you use Docker).
>>> >
>>> > I hope it helps.
>>> >
>>> > Regards,
>>> > Quan
>>> >
>>> > On Wed, Sep 16, 2026 at 1:54 PM Felix Auringer <felix.auringer@giz.berlin
>>> >
>>> > wrote:
>>> >
>>> >> Hello together,
>>> >>
>>> >> I have some questions regarding the email queues in James.
>>> >>
>>> >> As far as I understand, there are two processes where an email queue is
>>> >> necessary, receiving email and sending email.
>>> >> In my head, the ideal process for these processes looks like this:
>>> >>
>>> >> - After the client has sent all commands, the email is put in a queue
>>> >> (spool / outgoing).
>>> >> - If and only if the queue operation succeeded, James tells the client
>>> >> that its email was received successfully.
>>> >> - The spooler/deliverer takes an email from the queue and processes it
>>> >> (mailetcontainer / remote delivery).
>>> >> - If and only if the email processing was successful (persisted in
>>> >> mailbox/accepted by remote server), the email is removed from the queue.
>>> >>
>>> >> If I understand the James code correctly (please correct me if I'm
>>> wrong),
>>> >> the processors completely take emails out of the queue (meaning they
>>> only
>>> >> exist in memory?) and reinsert them later if necessary.
>>> >> This would mean that a crash / server restart while an email is
>>> processed
>>> >> would mean that the email is lost with no possibility of informing the
>>> >> client. Can I do something about that?
>>> >>
>>> >> According to the docs (and logs during startup), James uses two
>>> different
>>> >> message queues:
>>> >>
>>> >> - ActiveMQ (https://james.apache.org/server/config-activemq.html):
>>> >> Manages at least the queues 'spool' and 'outgoing' according to the
>>> docs.
>>> >> According to my logs, it uses KahaDB as persistence adapter.
>>> >> - RabbitMQ (https://james.apache.org/server/config-rabbitmq.html): Used
>>> >> for distributed MailQueue and distributed event system according to the
>>> >> docs. It is also running in my single node deployment (as in-memory
>>> version
>>> >> because I did not configure anything).
>>> >>
>>> >> Which of them is used for the processes described above?
>>> >> Can I configure persistence for the email queues? I would like to have a
>>> >> system which I can restart while emails are queued without them getting
>>> >> lost.
>>> >>
>>> >> Best regards,
>>> >> Felix
>>> >> ---
>>> >> Gesellschaft für interkulturelles
>>> >> Zusammenleben gGmbH (GIZ)
>>> >> Felix Auringer
>>> >> IT
>>> >> Reformationsplatz 2
>>> >> 13597 Berlin
>>> >>
>>> >> Tel: 030/513 0100 00; Fax: 030/513 0100 09
>>> >> www.giz.berlin;felix.auringer@giz.berlin
>>> >>
>>> >> Amtsgericht Charlottenburg HRB 200872 B
>>> >> Geschäftsführerin: Dr. Britta Marschke
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>> >> For additional commands, e-mail: server-user-help@james.apache.org
>>> >>
>>> >>
>>> >
>>>
>>> ---
>>> Gesellschaft für interkulturelles
>>> Zusammenleben gGmbH (GIZ)
>>> Felix Auringer
>>> IT
>>> Reformationsplatz 2
>>> 13597 Berlin
>>>
>>> Tel: 030/513 0100 00; Fax: 030/513 0100 09
>>> www.giz.berlin;felix.auringer@giz.berlin
>>>
>>> Amtsgericht Charlottenburg HRB 200872 B
>>> Geschäftsführerin: Dr. Britta Marschke
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>
>>>
>
---
Gesellschaft für interkulturelles
Zusammenleben gGmbH (GIZ)
Felix Auringer
IT
Reformationsplatz 2
13597 Berlin
Tel: 030/513 0100 00; Fax: 030/513 0100 09
www.giz.berlin; felix.auringer@giz.berlin
Amtsgericht Charlottenburg HRB 200872 B
Geschäftsführerin: Dr. Britta Marschke
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re[2]: Email Queues in James
Posted by Терсков Иль я Андреевич <i....@kps-t.ru>.
Hi everyone,
Since there is such a lively discussion going on, I wanted to jump in
with a quick question related to the topic.
Doesn't the database itself handle data persistence? Is it possible to
drop ActiveMQ, switch to the MemoryMailQueueModule (from memory-app),
and rely on the database (like H2, for example) to guarantee persistence
instead?
Thanks in advance for your insights!
С уважением,
Руководитель ИТ
ООО «КПС-Технологии»
Терсков Илья Андреевич
Моб.: +7 (996) 415-16-29
E-mail:i.terskov@kps-t.ru
УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ:
Это электронное сообщение и любые документы, приложенные к нему,
содержат
конфиденциальную информацию. Настоящим уведомляем Вас, что если это
сообщение
не предназначено Вам, использование, копирование и распространение
информации,
содержащейся в настоящем сообщении, а также осуществление любых действий
на
основе этой информации строго запрещено. Если Вы получили это сообщение
по
ошибке, пожалуйста, сообщите об этом отправителю по электронной почте и
удалите данное сообщение.
CONFIDENTIALITY NOTICE:
This email and any files attached to it are confidential. If you are not
the
intended recipient, you are notified that using, copying, distributing,
or taking
any action in reliance on the contents of this information is strictly
prohibited.
If you have received this email in error, please notify the sender and
delete this
message.
------ Исходное сообщение ------
От "Quan tran hong" <qu...@gmail.com>
Кому "James Users List" <se...@james.apache.org>
Дата 17.09.2026 9:59:35
Тема Re: Email Queues in James
>Hi Felix,
>
>> Do you know for which queues ActiveMQ and for which RabbitMQ is used?
>
>Actually, it is weird to mix the use of both. It should usually be either
>one of them. Can I know which James app you are using?
>
>> Do I have to configure a dedicated RabbitMQ server for persistence?
>
>I think you can still have persistence with ActiveMQ.
>
>> My deployment currently uses an in-memory RabbitMQ which does not have
>persistence, I guess.
>
>The "in-memory RabbitMQ" term seems weird to me.
>
>> Is there documentation anywhere on how to configure the queues for
>persistence?
>
>Just make sure your ActiveMQ/RabbitMQ data is persisted is ok.
>e.g. for ActiveMQ: `var/store/activemq/` (Relative to James’s working
>directory)
>e.g. for RabbitMQ: `/var/lib/rabbitmq/`
>
>Quan
>
>On Wed, Sep 16, 2026 at 4:46 PM Felix Auringer <fe...@giz.berlin>
>wrote:
>
>> Hi Quan,
>>
>> thanks for your reply!
>> Good to know that I misunderstood the dequeuing in the code and it
>> actually works like I would like.
>> Do you know for which queues ActiveMQ and for which RabbitMQ is used?
>> Do I have to configure a dedicated RabbitMQ server for persistence? My
>> deployment currently uses an in-memory RabbitMQ which does not have
>> persistence, I guess.
>> Is there documentation anywhere on how to configure the queues for
>> persistence?
>>
>> Best regards,
>> Felix
>>
>> On 16/09/2026 11.30, Quan tran hong wrote:
>> > Hi Felix,
>> >
>> >> If I understand the James code correctly (please correct me if I'm
>> > wrong), the processors completely take emails out of the queue (meaning
>> > they only exist in memory?) and reinsert them later if necessary.
>> > This would mean that a crash / server restart while an email is processed
>> > would mean that the email is lost with no possibility of informing the
>> > client. Can I do something about that?
>> >
>> > Dequeueing does not permanently remove a mail from the mail queue (yet).
>> > James keeps it unacknowledged while processing it and
>> commits/acknowledges
>> > it; failures cause rollback/nack and redelivery by RabbitMQ. A James
>> > restart during processing, therefore, would not cause message loss.
>> >
>> >> Can I configure persistence for the email queues? I would like to have a
>> > system which I can restart while emails are queued without them getting
>> > lost.
>> >
>> > I think for RabbitMQ, James set those mail queues to be *durable*
>> already.
>> > You just need to make sure your RabbitMQ data path is persisted (in case
>> > you use Docker).
>> >
>> > I hope it helps.
>> >
>> > Regards,
>> > Quan
>> >
>> > On Wed, Sep 16, 2026 at 1:54 PM Felix Auringer <felix.auringer@giz.berlin
>> >
>> > wrote:
>> >
>> >> Hello together,
>> >>
>> >> I have some questions regarding the email queues in James.
>> >>
>> >> As far as I understand, there are two processes where an email queue is
>> >> necessary, receiving email and sending email.
>> >> In my head, the ideal process for these processes looks like this:
>> >>
>> >> - After the client has sent all commands, the email is put in a queue
>> >> (spool / outgoing).
>> >> - If and only if the queue operation succeeded, James tells the client
>> >> that its email was received successfully.
>> >> - The spooler/deliverer takes an email from the queue and processes it
>> >> (mailetcontainer / remote delivery).
>> >> - If and only if the email processing was successful (persisted in
>> >> mailbox/accepted by remote server), the email is removed from the queue.
>> >>
>> >> If I understand the James code correctly (please correct me if I'm
>> wrong),
>> >> the processors completely take emails out of the queue (meaning they
>> only
>> >> exist in memory?) and reinsert them later if necessary.
>> >> This would mean that a crash / server restart while an email is
>> processed
>> >> would mean that the email is lost with no possibility of informing the
>> >> client. Can I do something about that?
>> >>
>> >> According to the docs (and logs during startup), James uses two
>> different
>> >> message queues:
>> >>
>> >> - ActiveMQ (https://james.apache.org/server/config-activemq.html):
>> >> Manages at least the queues 'spool' and 'outgoing' according to the
>> docs.
>> >> According to my logs, it uses KahaDB as persistence adapter.
>> >> - RabbitMQ (https://james.apache.org/server/config-rabbitmq.html): Used
>> >> for distributed MailQueue and distributed event system according to the
>> >> docs. It is also running in my single node deployment (as in-memory
>> version
>> >> because I did not configure anything).
>> >>
>> >> Which of them is used for the processes described above?
>> >> Can I configure persistence for the email queues? I would like to have a
>> >> system which I can restart while emails are queued without them getting
>> >> lost.
>> >>
>> >> Best regards,
>> >> Felix
>> >> ---
>> >> Gesellschaft für interkulturelles
>> >> Zusammenleben gGmbH (GIZ)
>> >> Felix Auringer
>> >> IT
>> >> Reformationsplatz 2
>> >> 13597 Berlin
>> >>
>> >> Tel: 030/513 0100 00; Fax: 030/513 0100 09
>> >> www.giz.berlin;felix.auringer@giz.berlin
>> >>
>> >> Amtsgericht Charlottenburg HRB 200872 B
>> >> Geschäftsführerin: Dr. Britta Marschke
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> >> For additional commands, e-mail: server-user-help@james.apache.org
>> >>
>> >>
>> >
>>
>> ---
>> Gesellschaft für interkulturelles
>> Zusammenleben gGmbH (GIZ)
>> Felix Auringer
>> IT
>> Reformationsplatz 2
>> 13597 Berlin
>>
>> Tel: 030/513 0100 00; Fax: 030/513 0100 09
>>www.giz.berlin;felix.auringer@giz.berlin
>>
>> Amtsgericht Charlottenburg HRB 200872 B
>> Geschäftsführerin: Dr. Britta Marschke
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
Re[2]: Email Queues in James
Posted by Терсков Иль я Андреевич <i....@kps-t.ru>.
Hi everyone,
Since there is such a lively discussion going on, I wanted to jump in
with a quick question related to the topic.
Doesn't the database itself handle data persistence? Is it possible to
drop ActiveMQ, switch to the MemoryMailQueueModule (from memory-app),
and rely on the database (like H2, for example) to guarantee persistence
instead?
Thanks in advance for your insights!
С уважением,
Руководитель ИТ
ООО «КПС-Технологии»
Терсков Илья Андреевич
Моб.: +7 (996) 415-16-29
E-mail:i.terskov@kps-t.ru
УВЕДОМЛЕНИЕ О КОНФИДЕНЦИАЛЬНОСТИ:
Это электронное сообщение и любые документы, приложенные к нему,
содержат
конфиденциальную информацию. Настоящим уведомляем Вас, что если это
сообщение
не предназначено Вам, использование, копирование и распространение
информации,
содержащейся в настоящем сообщении, а также осуществление любых действий
на
основе этой информации строго запрещено. Если Вы получили это сообщение
по
ошибке, пожалуйста, сообщите об этом отправителю по электронной почте и
удалите данное сообщение.
CONFIDENTIALITY NOTICE:
This email and any files attached to it are confidential. If you are not
the
intended recipient, you are notified that using, copying, distributing,
or taking
any action in reliance on the contents of this information is strictly
prohibited.
If you have received this email in error, please notify the sender and
delete this
message.
------ Исходное сообщение ------
От "Quan tran hong" <qu...@gmail.com>
Кому "James Users List" <se...@james.apache.org>
Дата 17.09.2026 9:59:35
Тема Re: Email Queues in James
>Hi Felix,
>
>> Do you know for which queues ActiveMQ and for which RabbitMQ is used?
>
>Actually, it is weird to mix the use of both. It should usually be either
>one of them. Can I know which James app you are using?
>
>> Do I have to configure a dedicated RabbitMQ server for persistence?
>
>I think you can still have persistence with ActiveMQ.
>
>> My deployment currently uses an in-memory RabbitMQ which does not have
>persistence, I guess.
>
>The "in-memory RabbitMQ" term seems weird to me.
>
>> Is there documentation anywhere on how to configure the queues for
>persistence?
>
>Just make sure your ActiveMQ/RabbitMQ data is persisted is ok.
>e.g. for ActiveMQ: `var/store/activemq/` (Relative to James’s working
>directory)
>e.g. for RabbitMQ: `/var/lib/rabbitmq/`
>
>Quan
>
>On Wed, Sep 16, 2026 at 4:46 PM Felix Auringer <fe...@giz.berlin>
>wrote:
>
>> Hi Quan,
>>
>> thanks for your reply!
>> Good to know that I misunderstood the dequeuing in the code and it
>> actually works like I would like.
>> Do you know for which queues ActiveMQ and for which RabbitMQ is used?
>> Do I have to configure a dedicated RabbitMQ server for persistence? My
>> deployment currently uses an in-memory RabbitMQ which does not have
>> persistence, I guess.
>> Is there documentation anywhere on how to configure the queues for
>> persistence?
>>
>> Best regards,
>> Felix
>>
>> On 16/09/2026 11.30, Quan tran hong wrote:
>> > Hi Felix,
>> >
>> >> If I understand the James code correctly (please correct me if I'm
>> > wrong), the processors completely take emails out of the queue (meaning
>> > they only exist in memory?) and reinsert them later if necessary.
>> > This would mean that a crash / server restart while an email is processed
>> > would mean that the email is lost with no possibility of informing the
>> > client. Can I do something about that?
>> >
>> > Dequeueing does not permanently remove a mail from the mail queue (yet).
>> > James keeps it unacknowledged while processing it and
>> commits/acknowledges
>> > it; failures cause rollback/nack and redelivery by RabbitMQ. A James
>> > restart during processing, therefore, would not cause message loss.
>> >
>> >> Can I configure persistence for the email queues? I would like to have a
>> > system which I can restart while emails are queued without them getting
>> > lost.
>> >
>> > I think for RabbitMQ, James set those mail queues to be *durable*
>> already.
>> > You just need to make sure your RabbitMQ data path is persisted (in case
>> > you use Docker).
>> >
>> > I hope it helps.
>> >
>> > Regards,
>> > Quan
>> >
>> > On Wed, Sep 16, 2026 at 1:54 PM Felix Auringer <felix.auringer@giz.berlin
>> >
>> > wrote:
>> >
>> >> Hello together,
>> >>
>> >> I have some questions regarding the email queues in James.
>> >>
>> >> As far as I understand, there are two processes where an email queue is
>> >> necessary, receiving email and sending email.
>> >> In my head, the ideal process for these processes looks like this:
>> >>
>> >> - After the client has sent all commands, the email is put in a queue
>> >> (spool / outgoing).
>> >> - If and only if the queue operation succeeded, James tells the client
>> >> that its email was received successfully.
>> >> - The spooler/deliverer takes an email from the queue and processes it
>> >> (mailetcontainer / remote delivery).
>> >> - If and only if the email processing was successful (persisted in
>> >> mailbox/accepted by remote server), the email is removed from the queue.
>> >>
>> >> If I understand the James code correctly (please correct me if I'm
>> wrong),
>> >> the processors completely take emails out of the queue (meaning they
>> only
>> >> exist in memory?) and reinsert them later if necessary.
>> >> This would mean that a crash / server restart while an email is
>> processed
>> >> would mean that the email is lost with no possibility of informing the
>> >> client. Can I do something about that?
>> >>
>> >> According to the docs (and logs during startup), James uses two
>> different
>> >> message queues:
>> >>
>> >> - ActiveMQ (https://james.apache.org/server/config-activemq.html):
>> >> Manages at least the queues 'spool' and 'outgoing' according to the
>> docs.
>> >> According to my logs, it uses KahaDB as persistence adapter.
>> >> - RabbitMQ (https://james.apache.org/server/config-rabbitmq.html): Used
>> >> for distributed MailQueue and distributed event system according to the
>> >> docs. It is also running in my single node deployment (as in-memory
>> version
>> >> because I did not configure anything).
>> >>
>> >> Which of them is used for the processes described above?
>> >> Can I configure persistence for the email queues? I would like to have a
>> >> system which I can restart while emails are queued without them getting
>> >> lost.
>> >>
>> >> Best regards,
>> >> Felix
>> >> ---
>> >> Gesellschaft für interkulturelles
>> >> Zusammenleben gGmbH (GIZ)
>> >> Felix Auringer
>> >> IT
>> >> Reformationsplatz 2
>> >> 13597 Berlin
>> >>
>> >> Tel: 030/513 0100 00; Fax: 030/513 0100 09
>> >> www.giz.berlin;felix.auringer@giz.berlin
>> >>
>> >> Amtsgericht Charlottenburg HRB 200872 B
>> >> Geschäftsführerin: Dr. Britta Marschke
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> >> For additional commands, e-mail: server-user-help@james.apache.org
>> >>
>> >>
>> >
>>
>> ---
>> Gesellschaft für interkulturelles
>> Zusammenleben gGmbH (GIZ)
>> Felix Auringer
>> IT
>> Reformationsplatz 2
>> 13597 Berlin
>>
>> Tel: 030/513 0100 00; Fax: 030/513 0100 09
>>www.giz.berlin;felix.auringer@giz.berlin
>>
>> Amtsgericht Charlottenburg HRB 200872 B
>> Geschäftsführerin: Dr. Britta Marschke
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
Re: Email Queues in James
Posted by Quan tran hong <qu...@gmail.com>.
Hi Felix,
> But it could also mean that an in-memory alternative to RabbitMQ is
started instead.
> So I guess that ActiveMQ is used as MailQueue in my case.
yes, it is the case.
> As far as I read in the docs or example configurations, there is no way
to explicitly activate / deactivate ActiveMQ anyway, so it makes sense that
it is used as MailQueue by default.
If you configure the `rabbitmq.properties` and points to the actual
RabbitMQ (as the logs complained "RabbitMQ configuration was not found,
defaulting to in memory event bus"), all your queues usage would rely on
RabbitMQ instead.
Quan
On Thu, Sep 17, 2026 at 1:22 PM Felix Auringer <fe...@giz.berlin>
wrote:
> Hi Quan,
>
> > Actually, it is weird to mix the use of both. It should usually be either
> > one of them. Can I know which James app you are using?
>
> > The "in-memory RabbitMQ" term seems weird to me.
>
> I am using the Docker image of the postgres app (not distributed).
> I do not have any rabbitmq configuration file and the logs state that
> James is defaulting to an in-memory event bus.
> My activemq configuration file only contains `adjust.usage.limits=true`
> because activemq threw an error during startup otherwise (although I think
> that this was in an older version and might not be the case anymore).
> These lines appear in my log:
>
> RabbitMQ configuration was not found, defaulting to in memory event bus
> Started embedded ActiveMQ
>
> From the first line, I always inferred that an in-memory instance of
> RabbitMQ is started as event bus.
> But it could also mean that an in-memory alternative to RabbitMQ is
> started instead.
> So I guess that ActiveMQ is used as MailQueue in my case.
> As far as I read in the docs or example configurations, there is no way to
> explicitly activate / deactivate ActiveMQ anyway, so it makes sense that it
> is used as MailQueue by default.
> Thanks for helping me figure that out!
>
> > Just make sure your ActiveMQ/RabbitMQ data is persisted is ok.
> > e.g. for ActiveMQ: `var/store/activemq/` (Relative to James’s working
> > directory)
> > e.g. for RabbitMQ: `/var/lib/rabbitmq/`
>
> The directory for RabbitMQ does not exist and James never tries to write
> to it (I am using a read only filesystem, so that would trigger an error
> which I have never observed). Which makes sense if only an in-memory
> alternative to RabbitMQ is running.
> The ActiveMQ directory exists and contains data, so I will persist that,
> thanks!
>
> Best regards,
> Felix
>
> On 17/09/2026 04.59, Quan tran hong wrote:
> > Hi Felix,
> >
> >> Do you know for which queues ActiveMQ and for which RabbitMQ is used?
> >
> > Actually, it is weird to mix the use of both. It should usually be either
> > one of them. Can I know which James app you are using?
> >
> >> Do I have to configure a dedicated RabbitMQ server for persistence?
> >
> > I think you can still have persistence with ActiveMQ.
> >
> >> My deployment currently uses an in-memory RabbitMQ which does not have
> > persistence, I guess.
> >
> > The "in-memory RabbitMQ" term seems weird to me.
> >
> >> Is there documentation anywhere on how to configure the queues for
> > persistence?
> >
> > Just make sure your ActiveMQ/RabbitMQ data is persisted is ok.
> > e.g. for ActiveMQ: `var/store/activemq/` (Relative to James’s working
> > directory)
> > e.g. for RabbitMQ: `/var/lib/rabbitmq/`
> >
> > Quan
> >
> > On Wed, Sep 16, 2026 at 4:46 PM Felix Auringer <felix.auringer@giz.berlin
> >
> > wrote:
> >
> >> Hi Quan,
> >>
> >> thanks for your reply!
> >> Good to know that I misunderstood the dequeuing in the code and it
> >> actually works like I would like.
> >> Do you know for which queues ActiveMQ and for which RabbitMQ is used?
> >> Do I have to configure a dedicated RabbitMQ server for persistence? My
> >> deployment currently uses an in-memory RabbitMQ which does not have
> >> persistence, I guess.
> >> Is there documentation anywhere on how to configure the queues for
> >> persistence?
> >>
> >> Best regards,
> >> Felix
> >>
> >> On 16/09/2026 11.30, Quan tran hong wrote:
> >>> Hi Felix,
> >>>
> >>>> If I understand the James code correctly (please correct me if I'm
> >>> wrong), the processors completely take emails out of the queue (meaning
> >>> they only exist in memory?) and reinsert them later if necessary.
> >>> This would mean that a crash / server restart while an email is
> processed
> >>> would mean that the email is lost with no possibility of informing the
> >>> client. Can I do something about that?
> >>>
> >>> Dequeueing does not permanently remove a mail from the mail queue
> (yet).
> >>> James keeps it unacknowledged while processing it and
> >> commits/acknowledges
> >>> it; failures cause rollback/nack and redelivery by RabbitMQ. A James
> >>> restart during processing, therefore, would not cause message loss.
> >>>
> >>>> Can I configure persistence for the email queues? I would like to
> have a
> >>> system which I can restart while emails are queued without them getting
> >>> lost.
> >>>
> >>> I think for RabbitMQ, James set those mail queues to be *durable*
> >> already.
> >>> You just need to make sure your RabbitMQ data path is persisted (in
> case
> >>> you use Docker).
> >>>
> >>> I hope it helps.
> >>>
> >>> Regards,
> >>> Quan
> >>>
> >>> On Wed, Sep 16, 2026 at 1:54 PM Felix Auringer
> <felix.auringer@giz.berlin
> >>>
> >>> wrote:
> >>>
> >>>> Hello together,
> >>>>
> >>>> I have some questions regarding the email queues in James.
> >>>>
> >>>> As far as I understand, there are two processes where an email queue
> is
> >>>> necessary, receiving email and sending email.
> >>>> In my head, the ideal process for these processes looks like this:
> >>>>
> >>>> - After the client has sent all commands, the email is put in a queue
> >>>> (spool / outgoing).
> >>>> - If and only if the queue operation succeeded, James tells the client
> >>>> that its email was received successfully.
> >>>> - The spooler/deliverer takes an email from the queue and processes it
> >>>> (mailetcontainer / remote delivery).
> >>>> - If and only if the email processing was successful (persisted in
> >>>> mailbox/accepted by remote server), the email is removed from the
> queue.
> >>>>
> >>>> If I understand the James code correctly (please correct me if I'm
> >> wrong),
> >>>> the processors completely take emails out of the queue (meaning they
> >> only
> >>>> exist in memory?) and reinsert them later if necessary.
> >>>> This would mean that a crash / server restart while an email is
> >> processed
> >>>> would mean that the email is lost with no possibility of informing the
> >>>> client. Can I do something about that?
> >>>>
> >>>> According to the docs (and logs during startup), James uses two
> >> different
> >>>> message queues:
> >>>>
> >>>> - ActiveMQ (https://james.apache.org/server/config-activemq.html):
> >>>> Manages at least the queues 'spool' and 'outgoing' according to the
> >> docs.
> >>>> According to my logs, it uses KahaDB as persistence adapter.
> >>>> - RabbitMQ (https://james.apache.org/server/config-rabbitmq.html):
> Used
> >>>> for distributed MailQueue and distributed event system according to
> the
> >>>> docs. It is also running in my single node deployment (as in-memory
> >> version
> >>>> because I did not configure anything).
> <https://www.google.com/maps/search/se+I+did+not+configure+anything).?entry=gmail&source=g>
> >>>>
> >>>> Which of them is used for the processes described above?
> >>>> Can I configure persistence for the email queues? I would like to
> have a
> >>>> system which I can restart while emails are queued without them
> getting
> >>>> lost.
> >>>>
> >>>> Best regards,
> >>>> Felix
> >>>> ---
> >>>> Gesellschaft für interkulturelles
> >>>> Zusammenleben gGmbH (GIZ)
> >>>> Felix Auringer
> >>>> IT
> >>>> Reformationsplatz 2
> >>>> 13597 Berlin
> >>>>
> >>>> Tel: 030/513 0100 00; Fax: 030/513 0100 09
> >>>> www.giz.berlin; felix.auringer@giz.berlin
> <https://www.google.com/maps/search/berlin;+felix.auringer@giz.berlin?entry=gmail&source=g>
> >>>>
> >>>> Amtsgericht Charlottenburg HRB 200872 B
> >>>> Geschäftsführerin: Dr. Britta Marschke
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> >>>> For additional commands, e-mail: server-user-help@james.apache.org
> >>>>
> >>>>
> >>>
> >>
> >> ---
> >> Gesellschaft für interkulturelles
> >> Zusammenleben gGmbH (GIZ)
> >> Felix Auringer
> >> IT
> >> Reformationsplatz 2
> >> 13597 Berlin
> >>
> >> Tel: 030/513 0100 00; Fax: 030/513 0100 09
> >> www.giz.berlin; felix.auringer@giz.berlin
> >>
> >> Amtsgericht Charlottenburg HRB 200872 B
> >> Geschäftsführerin: Dr. Britta Marschke
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> >> For additional commands, e-mail: server-user-help@james.apache.org
> >>
> >>
> >
>
> ---
> Gesellschaft für interkulturelles
> Zusammenleben gGmbH (GIZ)
> Felix Auringer
> IT
> Reformationsplatz 2
> 13597 Berlin
>
> Tel: 030/513 0100 00; Fax: 030/513 0100 09
> www.giz.berlin; felix.auringer@giz.berlin
>
> Amtsgericht Charlottenburg HRB 200872 B
> Geschäftsführerin: Dr. Britta Marschke
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>
Re: Email Queues in James
Posted by Felix Auringer <fe...@giz.berlin>.
Hi Quan,
> Actually, it is weird to mix the use of both. It should usually be either
> one of them. Can I know which James app you are using?
> The "in-memory RabbitMQ" term seems weird to me.
I am using the Docker image of the postgres app (not distributed).
I do not have any rabbitmq configuration file and the logs state that James is defaulting to an in-memory event bus.
My activemq configuration file only contains `adjust.usage.limits=true` because activemq threw an error during startup otherwise (although I think that this was in an older version and might not be the case anymore).
These lines appear in my log:
RabbitMQ configuration was not found, defaulting to in memory event bus
Started embedded ActiveMQ
From the first line, I always inferred that an in-memory instance of RabbitMQ is started as event bus.
But it could also mean that an in-memory alternative to RabbitMQ is started instead.
So I guess that ActiveMQ is used as MailQueue in my case.
As far as I read in the docs or example configurations, there is no way to explicitly activate / deactivate ActiveMQ anyway, so it makes sense that it is used as MailQueue by default.
Thanks for helping me figure that out!
> Just make sure your ActiveMQ/RabbitMQ data is persisted is ok.
> e.g. for ActiveMQ: `var/store/activemq/` (Relative to James’s working
> directory)
> e.g. for RabbitMQ: `/var/lib/rabbitmq/`
The directory for RabbitMQ does not exist and James never tries to write to it (I am using a read only filesystem, so that would trigger an error which I have never observed). Which makes sense if only an in-memory alternative to RabbitMQ is running.
The ActiveMQ directory exists and contains data, so I will persist that, thanks!
Best regards,
Felix
On 17/09/2026 04.59, Quan tran hong wrote:
> Hi Felix,
>
>> Do you know for which queues ActiveMQ and for which RabbitMQ is used?
>
> Actually, it is weird to mix the use of both. It should usually be either
> one of them. Can I know which James app you are using?
>
>> Do I have to configure a dedicated RabbitMQ server for persistence?
>
> I think you can still have persistence with ActiveMQ.
>
>> My deployment currently uses an in-memory RabbitMQ which does not have
> persistence, I guess.
>
> The "in-memory RabbitMQ" term seems weird to me.
>
>> Is there documentation anywhere on how to configure the queues for
> persistence?
>
> Just make sure your ActiveMQ/RabbitMQ data is persisted is ok.
> e.g. for ActiveMQ: `var/store/activemq/` (Relative to James’s working
> directory)
> e.g. for RabbitMQ: `/var/lib/rabbitmq/`
>
> Quan
>
> On Wed, Sep 16, 2026 at 4:46 PM Felix Auringer <fe...@giz.berlin>
> wrote:
>
>> Hi Quan,
>>
>> thanks for your reply!
>> Good to know that I misunderstood the dequeuing in the code and it
>> actually works like I would like.
>> Do you know for which queues ActiveMQ and for which RabbitMQ is used?
>> Do I have to configure a dedicated RabbitMQ server for persistence? My
>> deployment currently uses an in-memory RabbitMQ which does not have
>> persistence, I guess.
>> Is there documentation anywhere on how to configure the queues for
>> persistence?
>>
>> Best regards,
>> Felix
>>
>> On 16/09/2026 11.30, Quan tran hong wrote:
>>> Hi Felix,
>>>
>>>> If I understand the James code correctly (please correct me if I'm
>>> wrong), the processors completely take emails out of the queue (meaning
>>> they only exist in memory?) and reinsert them later if necessary.
>>> This would mean that a crash / server restart while an email is processed
>>> would mean that the email is lost with no possibility of informing the
>>> client. Can I do something about that?
>>>
>>> Dequeueing does not permanently remove a mail from the mail queue (yet).
>>> James keeps it unacknowledged while processing it and
>> commits/acknowledges
>>> it; failures cause rollback/nack and redelivery by RabbitMQ. A James
>>> restart during processing, therefore, would not cause message loss.
>>>
>>>> Can I configure persistence for the email queues? I would like to have a
>>> system which I can restart while emails are queued without them getting
>>> lost.
>>>
>>> I think for RabbitMQ, James set those mail queues to be *durable*
>> already.
>>> You just need to make sure your RabbitMQ data path is persisted (in case
>>> you use Docker).
>>>
>>> I hope it helps.
>>>
>>> Regards,
>>> Quan
>>>
>>> On Wed, Sep 16, 2026 at 1:54 PM Felix Auringer <felix.auringer@giz.berlin
>>>
>>> wrote:
>>>
>>>> Hello together,
>>>>
>>>> I have some questions regarding the email queues in James.
>>>>
>>>> As far as I understand, there are two processes where an email queue is
>>>> necessary, receiving email and sending email.
>>>> In my head, the ideal process for these processes looks like this:
>>>>
>>>> - After the client has sent all commands, the email is put in a queue
>>>> (spool / outgoing).
>>>> - If and only if the queue operation succeeded, James tells the client
>>>> that its email was received successfully.
>>>> - The spooler/deliverer takes an email from the queue and processes it
>>>> (mailetcontainer / remote delivery).
>>>> - If and only if the email processing was successful (persisted in
>>>> mailbox/accepted by remote server), the email is removed from the queue.
>>>>
>>>> If I understand the James code correctly (please correct me if I'm
>> wrong),
>>>> the processors completely take emails out of the queue (meaning they
>> only
>>>> exist in memory?) and reinsert them later if necessary.
>>>> This would mean that a crash / server restart while an email is
>> processed
>>>> would mean that the email is lost with no possibility of informing the
>>>> client. Can I do something about that?
>>>>
>>>> According to the docs (and logs during startup), James uses two
>> different
>>>> message queues:
>>>>
>>>> - ActiveMQ (https://james.apache.org/server/config-activemq.html):
>>>> Manages at least the queues 'spool' and 'outgoing' according to the
>> docs.
>>>> According to my logs, it uses KahaDB as persistence adapter.
>>>> - RabbitMQ (https://james.apache.org/server/config-rabbitmq.html): Used
>>>> for distributed MailQueue and distributed event system according to the
>>>> docs. It is also running in my single node deployment (as in-memory
>> version
>>>> because I did not configure anything).
>>>>
>>>> Which of them is used for the processes described above?
>>>> Can I configure persistence for the email queues? I would like to have a
>>>> system which I can restart while emails are queued without them getting
>>>> lost.
>>>>
>>>> Best regards,
>>>> Felix
>>>> ---
>>>> Gesellschaft für interkulturelles
>>>> Zusammenleben gGmbH (GIZ)
>>>> Felix Auringer
>>>> IT
>>>> Reformationsplatz 2
>>>> 13597 Berlin
>>>>
>>>> Tel: 030/513 0100 00; Fax: 030/513 0100 09
>>>> www.giz.berlin; felix.auringer@giz.berlin
>>>>
>>>> Amtsgericht Charlottenburg HRB 200872 B
>>>> Geschäftsführerin: Dr. Britta Marschke
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>>>> For additional commands, e-mail: server-user-help@james.apache.org
>>>>
>>>>
>>>
>>
>> ---
>> Gesellschaft für interkulturelles
>> Zusammenleben gGmbH (GIZ)
>> Felix Auringer
>> IT
>> Reformationsplatz 2
>> 13597 Berlin
>>
>> Tel: 030/513 0100 00; Fax: 030/513 0100 09
>> www.giz.berlin; felix.auringer@giz.berlin
>>
>> Amtsgericht Charlottenburg HRB 200872 B
>> Geschäftsführerin: Dr. Britta Marschke
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
>
---
Gesellschaft für interkulturelles
Zusammenleben gGmbH (GIZ)
Felix Auringer
IT
Reformationsplatz 2
13597 Berlin
Tel: 030/513 0100 00; Fax: 030/513 0100 09
www.giz.berlin; felix.auringer@giz.berlin
Amtsgericht Charlottenburg HRB 200872 B
Geschäftsführerin: Dr. Britta Marschke
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Email Queues in James
Posted by Quan tran hong <qu...@gmail.com>.
Hi Felix,
> Do you know for which queues ActiveMQ and for which RabbitMQ is used?
Actually, it is weird to mix the use of both. It should usually be either
one of them. Can I know which James app you are using?
> Do I have to configure a dedicated RabbitMQ server for persistence?
I think you can still have persistence with ActiveMQ.
> My deployment currently uses an in-memory RabbitMQ which does not have
persistence, I guess.
The "in-memory RabbitMQ" term seems weird to me.
> Is there documentation anywhere on how to configure the queues for
persistence?
Just make sure your ActiveMQ/RabbitMQ data is persisted is ok.
e.g. for ActiveMQ: `var/store/activemq/` (Relative to James’s working
directory)
e.g. for RabbitMQ: `/var/lib/rabbitmq/`
Quan
On Wed, Sep 16, 2026 at 4:46 PM Felix Auringer <fe...@giz.berlin>
wrote:
> Hi Quan,
>
> thanks for your reply!
> Good to know that I misunderstood the dequeuing in the code and it
> actually works like I would like.
> Do you know for which queues ActiveMQ and for which RabbitMQ is used?
> Do I have to configure a dedicated RabbitMQ server for persistence? My
> deployment currently uses an in-memory RabbitMQ which does not have
> persistence, I guess.
> Is there documentation anywhere on how to configure the queues for
> persistence?
>
> Best regards,
> Felix
>
> On 16/09/2026 11.30, Quan tran hong wrote:
> > Hi Felix,
> >
> >> If I understand the James code correctly (please correct me if I'm
> > wrong), the processors completely take emails out of the queue (meaning
> > they only exist in memory?) and reinsert them later if necessary.
> > This would mean that a crash / server restart while an email is processed
> > would mean that the email is lost with no possibility of informing the
> > client. Can I do something about that?
> >
> > Dequeueing does not permanently remove a mail from the mail queue (yet).
> > James keeps it unacknowledged while processing it and
> commits/acknowledges
> > it; failures cause rollback/nack and redelivery by RabbitMQ. A James
> > restart during processing, therefore, would not cause message loss.
> >
> >> Can I configure persistence for the email queues? I would like to have a
> > system which I can restart while emails are queued without them getting
> > lost.
> >
> > I think for RabbitMQ, James set those mail queues to be *durable*
> already.
> > You just need to make sure your RabbitMQ data path is persisted (in case
> > you use Docker).
> >
> > I hope it helps.
> >
> > Regards,
> > Quan
> >
> > On Wed, Sep 16, 2026 at 1:54 PM Felix Auringer <felix.auringer@giz.berlin
> >
> > wrote:
> >
> >> Hello together,
> >>
> >> I have some questions regarding the email queues in James.
> >>
> >> As far as I understand, there are two processes where an email queue is
> >> necessary, receiving email and sending email.
> >> In my head, the ideal process for these processes looks like this:
> >>
> >> - After the client has sent all commands, the email is put in a queue
> >> (spool / outgoing).
> >> - If and only if the queue operation succeeded, James tells the client
> >> that its email was received successfully.
> >> - The spooler/deliverer takes an email from the queue and processes it
> >> (mailetcontainer / remote delivery).
> >> - If and only if the email processing was successful (persisted in
> >> mailbox/accepted by remote server), the email is removed from the queue.
> >>
> >> If I understand the James code correctly (please correct me if I'm
> wrong),
> >> the processors completely take emails out of the queue (meaning they
> only
> >> exist in memory?) and reinsert them later if necessary.
> >> This would mean that a crash / server restart while an email is
> processed
> >> would mean that the email is lost with no possibility of informing the
> >> client. Can I do something about that?
> >>
> >> According to the docs (and logs during startup), James uses two
> different
> >> message queues:
> >>
> >> - ActiveMQ (https://james.apache.org/server/config-activemq.html):
> >> Manages at least the queues 'spool' and 'outgoing' according to the
> docs.
> >> According to my logs, it uses KahaDB as persistence adapter.
> >> - RabbitMQ (https://james.apache.org/server/config-rabbitmq.html): Used
> >> for distributed MailQueue and distributed event system according to the
> >> docs. It is also running in my single node deployment (as in-memory
> version
> >> because I did not configure anything).
> >>
> >> Which of them is used for the processes described above?
> >> Can I configure persistence for the email queues? I would like to have a
> >> system which I can restart while emails are queued without them getting
> >> lost.
> >>
> >> Best regards,
> >> Felix
> >> ---
> >> Gesellschaft für interkulturelles
> >> Zusammenleben gGmbH (GIZ)
> >> Felix Auringer
> >> IT
> >> Reformationsplatz 2
> >> 13597 Berlin
> >>
> >> Tel: 030/513 0100 00; Fax: 030/513 0100 09
> >> www.giz.berlin; felix.auringer@giz.berlin
> >>
> >> Amtsgericht Charlottenburg HRB 200872 B
> >> Geschäftsführerin: Dr. Britta Marschke
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> >> For additional commands, e-mail: server-user-help@james.apache.org
> >>
> >>
> >
>
> ---
> Gesellschaft für interkulturelles
> Zusammenleben gGmbH (GIZ)
> Felix Auringer
> IT
> Reformationsplatz 2
> 13597 Berlin
>
> Tel: 030/513 0100 00; Fax: 030/513 0100 09
> www.giz.berlin; felix.auringer@giz.berlin
>
> Amtsgericht Charlottenburg HRB 200872 B
> Geschäftsführerin: Dr. Britta Marschke
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>
Re: Email Queues in James
Posted by Felix Auringer <fe...@giz.berlin>.
Hi Quan,
thanks for your reply!
Good to know that I misunderstood the dequeuing in the code and it actually works like I would like.
Do you know for which queues ActiveMQ and for which RabbitMQ is used?
Do I have to configure a dedicated RabbitMQ server for persistence? My deployment currently uses an in-memory RabbitMQ which does not have persistence, I guess.
Is there documentation anywhere on how to configure the queues for persistence?
Best regards,
Felix
On 16/09/2026 11.30, Quan tran hong wrote:
> Hi Felix,
>
>> If I understand the James code correctly (please correct me if I'm
> wrong), the processors completely take emails out of the queue (meaning
> they only exist in memory?) and reinsert them later if necessary.
> This would mean that a crash / server restart while an email is processed
> would mean that the email is lost with no possibility of informing the
> client. Can I do something about that?
>
> Dequeueing does not permanently remove a mail from the mail queue (yet).
> James keeps it unacknowledged while processing it and commits/acknowledges
> it; failures cause rollback/nack and redelivery by RabbitMQ. A James
> restart during processing, therefore, would not cause message loss.
>
>> Can I configure persistence for the email queues? I would like to have a
> system which I can restart while emails are queued without them getting
> lost.
>
> I think for RabbitMQ, James set those mail queues to be *durable* already.
> You just need to make sure your RabbitMQ data path is persisted (in case
> you use Docker).
>
> I hope it helps.
>
> Regards,
> Quan
>
> On Wed, Sep 16, 2026 at 1:54 PM Felix Auringer <fe...@giz.berlin>
> wrote:
>
>> Hello together,
>>
>> I have some questions regarding the email queues in James.
>>
>> As far as I understand, there are two processes where an email queue is
>> necessary, receiving email and sending email.
>> In my head, the ideal process for these processes looks like this:
>>
>> - After the client has sent all commands, the email is put in a queue
>> (spool / outgoing).
>> - If and only if the queue operation succeeded, James tells the client
>> that its email was received successfully.
>> - The spooler/deliverer takes an email from the queue and processes it
>> (mailetcontainer / remote delivery).
>> - If and only if the email processing was successful (persisted in
>> mailbox/accepted by remote server), the email is removed from the queue.
>>
>> If I understand the James code correctly (please correct me if I'm wrong),
>> the processors completely take emails out of the queue (meaning they only
>> exist in memory?) and reinsert them later if necessary.
>> This would mean that a crash / server restart while an email is processed
>> would mean that the email is lost with no possibility of informing the
>> client. Can I do something about that?
>>
>> According to the docs (and logs during startup), James uses two different
>> message queues:
>>
>> - ActiveMQ (https://james.apache.org/server/config-activemq.html):
>> Manages at least the queues 'spool' and 'outgoing' according to the docs.
>> According to my logs, it uses KahaDB as persistence adapter.
>> - RabbitMQ (https://james.apache.org/server/config-rabbitmq.html): Used
>> for distributed MailQueue and distributed event system according to the
>> docs. It is also running in my single node deployment (as in-memory version
>> because I did not configure anything).
>>
>> Which of them is used for the processes described above?
>> Can I configure persistence for the email queues? I would like to have a
>> system which I can restart while emails are queued without them getting
>> lost.
>>
>> Best regards,
>> Felix
>> ---
>> Gesellschaft für interkulturelles
>> Zusammenleben gGmbH (GIZ)
>> Felix Auringer
>> IT
>> Reformationsplatz 2
>> 13597 Berlin
>>
>> Tel: 030/513 0100 00; Fax: 030/513 0100 09
>> www.giz.berlin; felix.auringer@giz.berlin
>>
>> Amtsgericht Charlottenburg HRB 200872 B
>> Geschäftsführerin: Dr. Britta Marschke
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
>
---
Gesellschaft für interkulturelles
Zusammenleben gGmbH (GIZ)
Felix Auringer
IT
Reformationsplatz 2
13597 Berlin
Tel: 030/513 0100 00; Fax: 030/513 0100 09
www.giz.berlin; felix.auringer@giz.berlin
Amtsgericht Charlottenburg HRB 200872 B
Geschäftsführerin: Dr. Britta Marschke
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Email Queues in James
Posted by Quan tran hong <qu...@gmail.com>.
Hi Felix,
> If I understand the James code correctly (please correct me if I'm
wrong), the processors completely take emails out of the queue (meaning
they only exist in memory?) and reinsert them later if necessary.
This would mean that a crash / server restart while an email is processed
would mean that the email is lost with no possibility of informing the
client. Can I do something about that?
Dequeueing does not permanently remove a mail from the mail queue (yet).
James keeps it unacknowledged while processing it and commits/acknowledges
it; failures cause rollback/nack and redelivery by RabbitMQ. A James
restart during processing, therefore, would not cause message loss.
> Can I configure persistence for the email queues? I would like to have a
system which I can restart while emails are queued without them getting
lost.
I think for RabbitMQ, James set those mail queues to be *durable* already.
You just need to make sure your RabbitMQ data path is persisted (in case
you use Docker).
I hope it helps.
Regards,
Quan
On Wed, Sep 16, 2026 at 1:54 PM Felix Auringer <fe...@giz.berlin>
wrote:
> Hello together,
>
> I have some questions regarding the email queues in James.
>
> As far as I understand, there are two processes where an email queue is
> necessary, receiving email and sending email.
> In my head, the ideal process for these processes looks like this:
>
> - After the client has sent all commands, the email is put in a queue
> (spool / outgoing).
> - If and only if the queue operation succeeded, James tells the client
> that its email was received successfully.
> - The spooler/deliverer takes an email from the queue and processes it
> (mailetcontainer / remote delivery).
> - If and only if the email processing was successful (persisted in
> mailbox/accepted by remote server), the email is removed from the queue.
>
> If I understand the James code correctly (please correct me if I'm wrong),
> the processors completely take emails out of the queue (meaning they only
> exist in memory?) and reinsert them later if necessary.
> This would mean that a crash / server restart while an email is processed
> would mean that the email is lost with no possibility of informing the
> client. Can I do something about that?
>
> According to the docs (and logs during startup), James uses two different
> message queues:
>
> - ActiveMQ (https://james.apache.org/server/config-activemq.html):
> Manages at least the queues 'spool' and 'outgoing' according to the docs.
> According to my logs, it uses KahaDB as persistence adapter.
> - RabbitMQ (https://james.apache.org/server/config-rabbitmq.html): Used
> for distributed MailQueue and distributed event system according to the
> docs. It is also running in my single node deployment (as in-memory version
> because I did not configure anything).
>
> Which of them is used for the processes described above?
> Can I configure persistence for the email queues? I would like to have a
> system which I can restart while emails are queued without them getting
> lost.
>
> Best regards,
> Felix
> ---
> Gesellschaft für interkulturelles
> Zusammenleben gGmbH (GIZ)
> Felix Auringer
> IT
> Reformationsplatz 2
> 13597 Berlin
>
> Tel: 030/513 0100 00; Fax: 030/513 0100 09
> www.giz.berlin; felix.auringer@giz.berlin
>
> Amtsgericht Charlottenburg HRB 200872 B
> Geschäftsführerin: Dr. Britta Marschke
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>