I see your point. In our situation we are only using James to provide an SMTP front end to one of our systems so all inbound emails are being sent though this Mailet so I think we should be OK. I will take a look at the RemoteDelivery implementation to educate myself though.
Scott -----Original Message----- From: Stefano Bagnara [mailto:[EMAIL PROTECTED] Sent: Thursday, March 22, 2007 8:59 AM To: James Users List Subject: Re: How to pause the process of mails in spool? Scott Mitchell ha scritto: > And some Mailet code: > > if ("xt-retry".equalsIgnoreCase(mail.getState())) { > Thread.sleep(RETRY_SLEEP_SECONDS * 1000); > } Please note that implementing this logic inside a Mailet will "abuse" your spoolthread time What I mean is that if you configured 10 spoolthreads and you have let's say 100 messages to be retried you will end up delaying every incoming message by 10*RETRY_SLEEP_SECONDS seconds, even that mails that do not belongs to this processors. A better way to implement retry logic would be to do something like the RemoteDelivery: the threads and the spool created by the RemoteDelivery already contains this logic, I suggest to look at that sources and try to reuse it. We often discussed about extracting this logic from the RemoteDelivery so to provide the retry/delay features also in other spools, but we didn't implement it yet. Stefano --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
