Diego,
Interesting. I am planning to re-visit the spooling mechanism for v3 to
allow other things, such as clustering. So you have a requirement for FIFO?
You would need to have a SpoolRepository subclass that ensures FIFO behavior
for accept(). If you do it for James v2.x, the stable branch, the package
is org.apache.james.services, but James v3 moves the spool interface to
org.apache.mailet.
However, I'm not sure that Steve is totally correct. The JDBC spool code
uses the message ID (see James.getId()) for the key. getId() returns a
monotonically increasing value. Although you might have to limit the spool
threads to one, to ensure that processing finishes in a FIFO manner, a quick
glance suggests that the JDBC spool should do what you want.
--- Noel
-----Original Message-----
From: Diego Castillo [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 24, 2003 5:24
To: [EMAIL PROTECTED]
Subject: FIFO spool manager
Hi all,
I have been using James for about a year now. I have been able to solve
most of my issues thanks to this mailing list. But I have one last issue
that I must solve if I want the project to be used in production: I need
the spool manager to be FIFO.
Steve Short told me back in August 7th 2002 that message keys are stored
in a HashSet (sorry, I couldn't find the mail on the archives). This
does not seem to have changed in 2.1, and I haven't heard about such a
functionality being considered for James 3. So I guess that I will have
to implement it myself.
Can anyone (Noel, Danny, Serge...) offer any directions so that I do not
get lost in the James code? Which objects should I look into first?
Any recommendations on how to implement this FIFO ordering?
When I will be finished, I plan heavy load tests. Hopefully my
modification won't make James crash, and I will be happy to submit it if
anyone is interested.
Diego
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>