Unfortunaly it will not enough as the deletion needs to get done via ActiveMQBlobMessage.deleteFile() to work with all implementations.
Bye, Norman 2011/1/21 Gary Tully <[email protected]>: > Just thinking a bit more here. Will the messageId be sufficient to > find the file associated with a blob message. Getting back the > original message would be a little more expensive. > > If so, a BrokerService, MessageDeletedCallback.deleted(MessageId) > could do the trick, would need to be implemented for kahaDB and JDBC > at a minimum. > > Only problem will be a change to either the message store or broker > interface to facilitate the callback, both have compatibility > implications that would maybe warrant a major release. > > gary. > > On 20 January 2011 18:24, Norman Maurer <[email protected]> wrote: >> Hi there, >> >> I'm currently looking into patching activemq to automatic call >> ActiveMQBlobMessage.deleteFile() once a Message was successfuly >> consumed from a Queue or Topic (all durable subscripters received the >> message). The same should be true when an ActiveMQBlobMessage was >> removed via JMX. So I'm currently try to get a clue what would be the >> best place to handle that. >> >> I had a quick chat with Garry on IRC (#activemq) where I should get >> started to have a look. First idea was >> org.apache.activemq.broker.region.Queue#acknowledge and >> org.apache.activemq.broker.region.Queue#dropMessage. But after a bit >> more talk it was clear it will not work for Topics (with durable >> subscriptions). For this his idea was to add the support to the >> MessageStore which should work. Anyway I think he was right when told >> me he things maybe the best way would be to provide some kind of >> callback from the store when a Message was deleted from there. With >> this we could just implement this via such a Callback and would not >> need to hack on to many places. Does this sound like something which >> make sense ? >> >> This kind of work is related to: >> >> https://issues.apache.org/jira/browse/AMQ-3030 >> https://issues.apache.org/jira/browse/AMQ-3018 >> >> I'm happy for any comment or suggestions :) >> >> Bye, >> Norman >> > > > > -- > http://blog.garytully.com > http://fusesource.com >
