001 /** 002 * 003 * Copyright 2004 Protique Ltd 004 * 005 * Licensed under the Apache License, Version 2.0 (the "License"); 006 * you may not use this file except in compliance with the License. 007 * You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 * 017 **/ 018 package org.activemq.service; 019 020 import org.activemq.message.ConsumerInfo; 021 022 import javax.jms.JMSException; 023 024 025 /** 026 * A Topic based {@link MessageContainer} 027 * 028 * @version $Revision: 1.1.1.1 $ 029 */ 030 public interface TopicMessageContainer extends MessageContainer { 031 032 033 /** 034 * Sets the last acknowleged message ID for the given subscriber in this 035 * container so that if we shut down and recover we know where to start 036 * replaying messages from. 037 * 038 * @param subscription 039 * @param messageIdentity 040 */ 041 public void setLastAcknowledgedMessageID(Subscription subscription, MessageIdentity messageIdentity) throws JMSException; 042 043 /** 044 * A durable subscription has started so recovery any messages that are required. 045 * This method should find the last acknowledged message for the given subscription 046 * and then iterate through any further messages and those that match the subscription 047 * should be dispatched to this subscription so that they can be dispatched in the future 048 * 049 * @param subscription 050 */ 051 public void recoverSubscription(Subscription subscription) throws JMSException; 052 053 /** 054 * Stores the persistence details in the database 055 * 056 * @param info 057 * @param subscription 058 */ 059 public void storeSubscription(ConsumerInfo info, Subscription subscription) throws JMSException; 060 }