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 Patrick Pyette <pp...@inpriva.com> on 2011/08/05 00:38:18 UTC
Question re: Message persistence across James restarts
Hi,
I've got a custom mailet that uses an external service to determine whether it should forward a message or not. If the external service is down, the mailet queues the message and processes it like the RemoteDeliveryMailet.
The issue that I have is that if I restart James while messages are in this queue, the queue appears to be empty when James comes back up. I've checked that the broker is defined with 'persistence="true"' and from what I've seen from trolling through the code I don't see that adding messages is done with the NON-PERSISTENT attribute.
Any help would be appreciated!
Thanks,
Pat
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org
Re: Question re: Message persistence across James restarts
Posted by Eric Charles <er...@apache.org>.
Hi Patrick,
On 05/08/11 00:38, Patrick Pyette wrote:
> Hi,
>
> I've got a custom mailet that uses an external service to determine whether it should forward a message or not. If the external service is down, the mailet queues the message and processes it like the RemoteDeliveryMailet.
>
Is the routing to RemoteDeliveryMailet is done via mailetcontainer.xml ?
On which queue are you talking when you say "the mailet queues the
message..."
> The issue that I have is that if I restart James while messages are in this queue, the queue appears to be empty when James comes back up. I've checked that the broker is defined with 'persistence="true"' and from what I've seen from trolling through the code I don't see that adding messages is done with the NON-PERSISTENT attribute.
>
When a mail is dequeued, the JamesMailSpooler (or RemoteDelivery) must
confirm the mail has been correctly processed and call done(true) so the
session can be committed. if done(false), session is rollbacked, and
dequeued mail is remains in queue.
So everything is there to ensure no mail is lost if the mailet
processing fails.
Can you give us more inforamtion on the issue you encounter?
> Any help would be appreciated!
>
> Thanks,
> Pat
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
--
Eric Charles
http://about.echarles.net
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org