james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Serge Knystautas" <ser...@lokitech.com>
Subject Re: Spool processing (was 'Spool manager on M$ SQL' at James-User)
Date Thu, 14 Mar 2002 14:33:10 GMT
In theory the JDBC spool repository is already doing it as I'm telling the
JDBC driver to only return a certain number of records.  Probably not all
JDBC drivers implement this and still return the entire result... what you
should be able to do is override this for your particular database, if there
are known failings in JDBC drivers, e.g.,

<sql name="listMessagesSQL" db="mysql"> what you said with the limit part at
the end</sql>

I'm realizing it's probably confusing to have the mail use listMessagesSQL
and the spool to have a query of the same name... the spool one should be
renamed because it only needs a partial listing, while the mail one needs
all messages.

Serge Knystautas
Loki Technologies - Unstoppable Websites
http://www.lokitech.com/
----- Original Message -----
From: "Danny Angus" <danny@thought.co.uk>
To: "James Developers List" <james-dev@jakarta.apache.org>
Sent: Thursday, March 14, 2002 9:21 AM
Subject: RE: Spool processing (was 'Spool manager on M$ SQL' at James-User)


> I think you are on to something here, you could hide messages from the
spool
> manager, try to use a LIMIT in the SQL  ..
>
> in this block:
> <sqlDefs name="org.apache.james.mailrepository.JDBCSpoolRepository">
> change this:
>     <sql name="listMessagesSQL">SELECT message_name, message_state,
> last_updated FROM ${table} WHERE repository_name = ? ORDER BY last_updated
> ASC</sql>
>
> to this:
> <sql name="listMessagesSQL">SELECT message_name, message_state,
last_updated
> FROM ${table} WHERE repository_name = ? ORDER BY last_updated ASC LIMIT
> 10</sql>
>
> Obviously you can mess with the number at the end until you discover what
> the right number ought to be.
>
> Let us know what happens (it may just all break!)
> d.
>
> > -----Original Message-----
> > From: David Shpil [mailto:david@harmeron.com]
> > Sent: Thursday, March 14, 2002 10:17 AM
> > To: James Developers List
> > Subject: Spool processing (was 'Spool manager on M$ SQL' at James-User)
> >
> >
> > Guys,
> >
> > I'm still trying to get spool manager working better under some load.
> > As I mentioned before, message rate of more then 4 per sec overloads
> > the spool manager and dramaticly increases local delivery time. If the
> > message rate remains the same for some time, a local delivery time
> > continues to grow.
> >
> > IMHO, the problem is that Spool Manager grabs all messages available
from
> > the spool and then processes them. In my case, message rate is
relatively
> > high
> > and it causes the manager to grab more and more messages every time.
> >
> > So, first thing I would like to achieve is to provide kind of "quality
of
> > service"
> > for local delivery. In other words: I want to have minimal "local
delivery
> > message rate",
> > regardless of "incoming message rate". This might be done by
> > making a spool
> > manager
> > to grab limited number of messages ...
> >
> > Am I going in right direction? If I am, what changes should be done at
> > sqlResouces.xml file?
> >
> > TIA
> >
> > David.


--
To unsubscribe, e-mail:   <mailto:james-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:james-dev-help@jakarta.apache.org>


Mime
View raw message