Class TopicBroker
java.lang.Object
com.swiftmq.swiftlet.queue.AbstractQueue
com.swiftmq.impl.topic.standard.TopicBroker
public class TopicBroker
extends com.swiftmq.swiftlet.queue.AbstractQueue
-
Field Summary
Fields inherited from class com.swiftmq.swiftlet.queue.AbstractQueue
ACTIVESTANDBY, AS_MESSAGE, cleanUpInterval, consumerMode, EXCLUSIVE, flowController, maxMessages, NON_PERSISTENT, persistenceMode, PERSISTENT, receiverCount, SHARED, temporary -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddStaticSubscription(String routerName, boolean keepOnUnsubscribe) protected voidvoidCommit the transaction with the given transaction idvoidvoidCreates a new pull transaction and returns a unique transaction idCreates a new push transaction and returns a unique transaction idprotected ListgetMatchedTopics(String[] tokenizedPredicate) protected Stringprotected StringgetTopicName(String[] tokenizedPredicate) protected String[]booleanhasReceiver(com.swiftmq.jms.MessageImpl message) booleanReturns if the queue is running or notvoidvoidprotected voidprocessTopicInfo(TopicInfo topicInfo) voidputMessage(Object transactionId, com.swiftmq.jms.MessageImpl msg) voidremoveRemoteSubscriptions(String destination) protected voidremoveStaticSubscription(String routerName) protected voidremoveTopic(String topic, String[] tokenizedName) voidRolls back the transaction with the given transaction id.voidrollback(Object transactionId, boolean setRedelivered, com.swiftmq.tools.concurrent.AsyncCompletionCallback callback) voidrollback(Object localTransactionId, com.swiftmq.jms.XidImpl globalTransactionId, boolean setRedelivered) voidsetCompositeStoreTransaction(Object txId, com.swiftmq.swiftlet.store.CompositeStoreTransaction ct) voidsetSlowSubscriberCondition(SlowSubscriberCondition slowSubscriberCondition) voidStart the queue.voidStops the queue.protected voidsubscribe(TopicSubscription topicSubscription) toString()voidunlockQueue(Object txId, boolean markAsyncActive) protected voidunsubscribe(TopicSubscription topicSubscription) Methods inherited from class com.swiftmq.swiftlet.queue.AbstractQueue
acknowledgeMessage, acknowledgeMessage, acknowledgeMessages, addWireTapSubscriber, buildPreparedTransaction, cleanUpExpiredMessages, createView, decReceiverCount, deleteContent, deleteView, flushAccounting, getAndResetAverageLatency, getCacheSize, getCacheSizeKB, getCleanUpInterval, getCompositeStoreTransaction, getConsumedTotal, getConsumerMode, getConsumingRate, getCurrentCacheSizeKB, getCurrentCacheSizeMessages, getExpiredMessage, getFlowController, getIndexEntry, getLocalName, getMaxMessages, getMessage, getMessage, getMessage, getMessage, getMessage, getMessage, getMessageByIndex, getMonitorAlertThreshold, getNumberQueueMessages, getPersistenceMode, getProducedTotal, getProducingRate, getQueueIndex, getQueueIndex, getQueueName, getQueueReceiverListener, getReceiverCount, incReceiverCount, isAccounting, isTemporary, moveToTransaction, moveToTransaction, moveToTransactionReturnSize, moveToTransactionReturnSize, receiverClosed, registerMessageProcessor, removeMessageByIndex, removeMessages, removeWireTapSubscriber, resetCounters, selectBaseQueue, setCleanUpInterval, setConsumerMode, setFlowController, setLocalName, setMaxMessages, setPersistenceMode, setQueueName, setQueueReceiverListener, setTemporary, startAccounting, stopAccounting, timeoutMessageProcessor, unmarkAsyncActive, unregisterMessageProcessor
-
Constructor Details
-
TopicBroker
-
-
Method Details
-
getRootTopic
-
setSlowSubscriberCondition
-
addTopic
-
removeTopic
-
getTopicNames
-
getTopicName
-
getMatchedTopics
-
subscribe
-
unsubscribe
-
addStaticSubscription
-
removeStaticSubscription
-
processTopicInfo
-
startQueue
public void startQueue() throws com.swiftmq.swiftlet.queue.QueueExceptionStart the queue. Will be called from the queue manager. After startup all persistent messages stored in the queue must be available.- Overrides:
startQueuein classcom.swiftmq.swiftlet.queue.AbstractQueue- Throws:
com.swiftmq.swiftlet.queue.QueueException- on error
-
stopQueue
public void stopQueue() throws com.swiftmq.swiftlet.queue.QueueExceptionStops the queue. Will be called from the queue manager- Overrides:
stopQueuein classcom.swiftmq.swiftlet.queue.AbstractQueue- Throws:
com.swiftmq.swiftlet.queue.QueueException- on error
-
lockQueue
- Overrides:
lockQueuein classcom.swiftmq.swiftlet.queue.AbstractQueue
-
unlockQueue
- Overrides:
unlockQueuein classcom.swiftmq.swiftlet.queue.AbstractQueue
-
setCompositeStoreTransaction
public void setCompositeStoreTransaction(Object txId, com.swiftmq.swiftlet.store.CompositeStoreTransaction ct) - Overrides:
setCompositeStoreTransactionin classcom.swiftmq.swiftlet.queue.AbstractQueue
-
hasReceiver
public boolean hasReceiver(com.swiftmq.jms.MessageImpl message) - Specified by:
hasReceiverin classcom.swiftmq.swiftlet.queue.AbstractQueue
-
isRunning
public boolean isRunning()Returns if the queue is running or not- Overrides:
isRunningin classcom.swiftmq.swiftlet.queue.AbstractQueue- Returns:
- true/false
-
createPushTransaction
Creates a new push transaction and returns a unique transaction id- Specified by:
createPushTransactionin classcom.swiftmq.swiftlet.queue.AbstractQueue- Returns:
- transaction id
- Throws:
com.swiftmq.swiftlet.queue.QueueException- on error
-
createPullTransaction
Creates a new pull transaction and returns a unique transaction id- Specified by:
createPullTransactionin classcom.swiftmq.swiftlet.queue.AbstractQueue- Returns:
- transaction id
- Throws:
com.swiftmq.swiftlet.queue.QueueException- on error
-
prepare
public void prepare(Object localTransactionId, com.swiftmq.jms.XidImpl globalTransactionId) throws com.swiftmq.swiftlet.queue.QueueException - Specified by:
preparein classcom.swiftmq.swiftlet.queue.AbstractQueue- Throws:
com.swiftmq.swiftlet.queue.QueueException
-
commit
public void commit(Object localTransactionId, com.swiftmq.jms.XidImpl globalTransactionId) throws com.swiftmq.swiftlet.queue.QueueException - Specified by:
commitin classcom.swiftmq.swiftlet.queue.AbstractQueue- Throws:
com.swiftmq.swiftlet.queue.QueueException
-
commit
Commit the transaction with the given transaction id- Specified by:
commitin classcom.swiftmq.swiftlet.queue.AbstractQueue- Parameters:
transactionId- transaction id- Throws:
com.swiftmq.swiftlet.queue.QueueException- on error
-
commit
public void commit(Object transactionId, com.swiftmq.tools.concurrent.AsyncCompletionCallback callback) - Specified by:
commitin classcom.swiftmq.swiftlet.queue.AbstractQueue
-
rollback
public void rollback(Object localTransactionId, com.swiftmq.jms.XidImpl globalTransactionId, boolean setRedelivered) throws com.swiftmq.swiftlet.queue.QueueException - Specified by:
rollbackin classcom.swiftmq.swiftlet.queue.AbstractQueue- Throws:
com.swiftmq.swiftlet.queue.QueueException
-
rollback
public void rollback(Object transactionId, boolean setRedelivered) throws com.swiftmq.swiftlet.queue.QueueException Rolls back the transaction with the given transaction id. If the flagsetRedeliveredis set then the JMS properties for redelivery and delivery count of messages pulled within this transaction are updated- Specified by:
rollbackin classcom.swiftmq.swiftlet.queue.AbstractQueue- Parameters:
transactionId- transaction idsetRedelivered- specifies JMS redelivery setting- Throws:
com.swiftmq.swiftlet.queue.QueueException- on error
-
rollback
public void rollback(Object transactionId, boolean setRedelivered, com.swiftmq.tools.concurrent.AsyncCompletionCallback callback) - Specified by:
rollbackin classcom.swiftmq.swiftlet.queue.AbstractQueue
-
removeRemoteSubscriptions
-
putMessage
public void putMessage(Object transactionId, com.swiftmq.jms.MessageImpl msg) throws com.swiftmq.swiftlet.queue.QueueException - Specified by:
putMessagein classcom.swiftmq.swiftlet.queue.AbstractQueue- Throws:
com.swiftmq.swiftlet.queue.QueueException
-
toString
-