Hi, To the message store, let's introduce "delete all message in queue (@queueName)" method.
>> for cassandra it will delete the whole raw in one go. >> for JDBC there should be a similiar operation (maybe select and a delete). Thanks On Thu, Oct 23, 2014 at 10:56 PM, Hasitha Amal De Silva <[email protected]> wrote: > Hi all, > > At present we store the message content with the only identifier being the > message ID (correct me if I'm wrong). But this makes "queue purge" an > exhaustive operation. Since we have no way of filtering message content > relevant to a specific queue, we have to refer to the message metadata > table and retrieve all message IDs of the queue before issuing content > deletions. (2 database calls) > > Given that queue purge is not supposed to be a frequent activity, we could > live with this. > > But in case we need to optimize, it would be better to group message > content with queueName as a second key. In terms of RDBMS stores this can > be done via composite keys. In Cassandra, the queueName will need to be the > partition key and the message ID will be clustering key [1]. > > Should we go for this ? If yes, we need to check any performance impact > with further testing. > > [1] : > http://stackoverflow.com/questions/24949676/difference-between-partition-key-composite-key-and-clustering-key-in-cassandra > > -- > Cheers, > > Hasitha Amal De Silva > Software Engineer > Mobile : 0772037426 > Blog : http://devnutshell.tumblr.com/ > WSO2 Inc.: http://wso2.com ( lean.enterprise.middleware. ) > -- *Hasitha Abeykoon* Senior Software Engineer; WSO2, Inc.; http://wso2.com *cell:* *+94 719363063* *blog: **abeykoon.blogspot.com* <http://abeykoon.blogspot.com>
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
