Class RegionBroker
java.lang.Object
org.apache.activemq.broker.EmptyBroker
org.apache.activemq.broker.region.RegionBroker
- Direct Known Subclasses:
ManagedRegionBroker
Routes Broker operations to the correct messaging regions for processing.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BrokerServiceprotected final Map<org.apache.activemq.command.ConnectionId,org.apache.activemq.state.ConnectionState> protected DestinationFactoryprotected final DestinationStatisticsstatic final String -
Constructor Summary
ConstructorsConstructorDescriptionRegionBroker(BrokerService brokerService, org.apache.activemq.thread.TaskRunnerFactory taskRunnerFactory, SystemUsage memoryManager, DestinationFactory destinationFactory, DestinationInterceptor destinationInterceptor, org.apache.activemq.thread.Scheduler scheduler, ThreadPoolExecutor executor) -
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledge(ConsumerBrokerExchange consumerExchange, org.apache.activemq.command.MessageAck ack) Used to acknowledge the receipt of a message by a client.voidaddBroker(Connection connection, org.apache.activemq.command.BrokerInfo info) A remote Broker connectsprotected voidaddBrokerInClusterUpdate(org.apache.activemq.command.BrokerInfo info) voidaddConnection(ConnectionContext context, org.apache.activemq.command.ConnectionInfo info) A client is establishing a connection with the broker.addConsumer(ConnectionContext context, org.apache.activemq.command.ConsumerInfo info) Adds a consumer.addDestination(ConnectionContext context, org.apache.activemq.command.ActiveMQDestination destination, boolean createIfTemp) Used to create a destination.voidaddDestinationInfo(ConnectionContext context, org.apache.activemq.command.DestinationInfo info) Add and process a DestinationInfo objectvoidaddProducer(ConnectionContext context, org.apache.activemq.command.ProducerInfo info) Adds a producer.voidbeginTransaction(ConnectionContext context, org.apache.activemq.command.TransactionId xid) Starts a transaction.voidcalled when the brokerService startsvoidcommitTransaction(ConnectionContext context, org.apache.activemq.command.TransactionId xid, boolean onePhase) Commits a transaction.protected RegioncreateQueueRegion(SystemUsage memoryManager, org.apache.activemq.thread.TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory) protected RegioncreateTempQueueRegion(SystemUsage memoryManager, org.apache.activemq.thread.TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory) protected RegioncreateTempTopicRegion(SystemUsage memoryManager, org.apache.activemq.thread.TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory) protected RegioncreateTopicRegion(SystemUsage memoryManager, org.apache.activemq.thread.TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory) protected jakarta.jms.JMSExceptioncreateUnknownDestinationTypeException(org.apache.activemq.command.ActiveMQDestination destination) protected voiddoStop(org.apache.activemq.util.ServiceStopper ss) voidforgetTransaction(ConnectionContext context, org.apache.activemq.command.TransactionId transactionId) Forgets a transaction.voidgc()org.apache.activemq.command.BrokerIdGet the id of the brokerGet the name of the brokerlonggetConnectionContext(String clientId) Map<org.apache.activemq.command.ConnectionId,org.apache.activemq.state.ConnectionState> Map<org.apache.activemq.command.ActiveMQDestination,Destination> Returns a reference to the concurrent hash map that holds known destinations, do not modifyMap<org.apache.activemq.command.ActiveMQDestination,Destination> getDestinationMap(org.apache.activemq.command.ActiveMQDestination destination) return a reference destination map of a region based on the destination typeorg.apache.activemq.command.ActiveMQDestination[]getDestinations(org.apache.activemq.command.ActiveMQDestination destination) Provide an exact or wildcard lookup of destinations in the regionSet<org.apache.activemq.command.ActiveMQDestination>called to get Java thread pool executororg.apache.activemq.command.BrokerInfo[]Get the BrokerInfo's of any connected Brokersorg.apache.activemq.command.TransactionId[]getPreparedTransactions(ConnectionContext context) Gets a list of all the prepared xa transactions.getRegion(org.apache.activemq.command.ActiveMQDestination destination) getRoot()Ensure we get the Broker at the top of the Stackorg.apache.activemq.thread.Schedulercalled to get scheduler for executing TimerTaskbooleanprotected booleanisEqual(org.apache.activemq.command.ConnectionId connectionId, org.apache.activemq.command.ConnectionId connectionId2) booleanisExpired(org.apache.activemq.broker.region.MessageReference messageReference) Determine if a message has expired -allows default behaviour to be overridden - as the timestamp set by the producer can be out of sync with the brokerbooleanbooleanvoidmessageExpired(ConnectionContext context, org.apache.activemq.broker.region.MessageReference node, Subscription subscription) A Message has Expiredorg.apache.activemq.command.ResponsemessagePull(ConnectionContext context, org.apache.activemq.command.MessagePull pull) Allows a consumer to pull a message from a queuevoidpostProcessDispatch(org.apache.activemq.command.MessageDispatch messageDispatch) Notify the Broker that a dispatch has happenedintprepareTransaction(ConnectionContext context, org.apache.activemq.command.TransactionId xid) Prepares a transaction.voidpreProcessDispatch(org.apache.activemq.command.MessageDispatch messageDispatch) Notify the Broker that a dispatch is going to happenvoidprocessConsumerControl(ConsumerBrokerExchange consumerExchange, org.apache.activemq.command.ConsumerControl control) voidprocessDispatchNotification(org.apache.activemq.command.MessageDispatchNotification messageDispatchNotification) Process a notification of a dispatch - used by a Slave Brokerprotected voidvoidvoidremoveBroker(Connection connection, org.apache.activemq.command.BrokerInfo info) Remove a BrokerInfoprotected voidremoveBrokerInClusterUpdate(org.apache.activemq.command.BrokerInfo info) voidremoveConnection(ConnectionContext context, org.apache.activemq.command.ConnectionInfo info, Throwable error) A client is disconnecting from the broker.voidremoveConsumer(ConnectionContext context, org.apache.activemq.command.ConsumerInfo info) Removes a consumer.voidremoveDestination(ConnectionContext context, org.apache.activemq.command.ActiveMQDestination destination, long timeout) Used to destroy a destination.voidremoveDestinationInfo(ConnectionContext context, org.apache.activemq.command.DestinationInfo info) Remove and process a DestinationInfo objectvoidremoveProducer(ConnectionContext context, org.apache.activemq.command.ProducerInfo info) Removes a producer.voidremoveSubscription(ConnectionContext context, org.apache.activemq.command.RemoveSubscriptionInfo info) Deletes a durable subscription.voidrollbackTransaction(ConnectionContext context, org.apache.activemq.command.TransactionId xid) Rollback a transaction.voidsend(ProducerBrokerExchange producerExchange, org.apache.activemq.command.Message message) Send a message to the broker to using the specified destination.booleansendToDeadLetterQueue(ConnectionContext context, org.apache.activemq.broker.region.MessageReference node, Subscription subscription, Throwable poisonCause) A message needs to go to the DLQvoidsetAdminConnectionContext(ConnectionContext adminConnectionContext) Sets the default administration connection context used when configuring the broker on startup or via JMXvoidsetAllowTempAutoCreationOnSend(boolean allowTempAutoCreationOnSend) voidsetBrokerId(org.apache.activemq.command.BrokerId brokerId) voidsetBrokerName(String brokerName) voidsetKeepDurableSubsActive(boolean keepDurableSubsActive) voidstart()voidstop()Methods inherited from class org.apache.activemq.broker.EmptyBroker
addSession, fastProducer, getAdaptor, isFaultTolerantConfiguration, isFull, messageConsumed, messageDelivered, messageDiscarded, messageDispatched, networkBridgeStarted, networkBridgeStopped, nowMasterBroker, removeSession, slowConsumer, virtualDestinationAdded, virtualDestinationRemoved
-
Field Details
-
ORIGINAL_EXPIRATION
- See Also:
-
destinationStatistics
-
destinationFactory
-
connectionStates
protected final Map<org.apache.activemq.command.ConnectionId,org.apache.activemq.state.ConnectionState> connectionStates -
brokerService
-
-
Constructor Details
-
RegionBroker
public RegionBroker(BrokerService brokerService, org.apache.activemq.thread.TaskRunnerFactory taskRunnerFactory, SystemUsage memoryManager, DestinationFactory destinationFactory, DestinationInterceptor destinationInterceptor, org.apache.activemq.thread.Scheduler scheduler, ThreadPoolExecutor executor) throws IOException - Throws:
IOException
-
-
Method Details
-
getDestinationMap
Description copied from interface:RegionReturns a reference to the concurrent hash map that holds known destinations, do not modify- Specified by:
getDestinationMapin interfaceRegion- Overrides:
getDestinationMapin classEmptyBroker
-
getDestinationMap
public Map<org.apache.activemq.command.ActiveMQDestination,Destination> getDestinationMap(org.apache.activemq.command.ActiveMQDestination destination) Description copied from interface:Brokerreturn a reference destination map of a region based on the destination type- Specified by:
getDestinationMapin interfaceBroker- Overrides:
getDestinationMapin classEmptyBroker- Parameters:
destination- ActiveMQ Destination- Returns:
- destination Map
-
getDestinations
public Set<Destination> getDestinations(org.apache.activemq.command.ActiveMQDestination destination) Description copied from interface:RegionProvide an exact or wildcard lookup of destinations in the region- Specified by:
getDestinationsin interfaceRegion- Overrides:
getDestinationsin classEmptyBroker- Returns:
- a set of matching destination objects.
-
getQueueRegion
-
getTempQueueRegion
-
getTempTopicRegion
-
getTopicRegion
-
createTempTopicRegion
protected Region createTempTopicRegion(SystemUsage memoryManager, org.apache.activemq.thread.TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory) -
createTempQueueRegion
protected Region createTempQueueRegion(SystemUsage memoryManager, org.apache.activemq.thread.TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory) -
createTopicRegion
protected Region createTopicRegion(SystemUsage memoryManager, org.apache.activemq.thread.TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory) -
createQueueRegion
protected Region createQueueRegion(SystemUsage memoryManager, org.apache.activemq.thread.TaskRunnerFactory taskRunnerFactory, DestinationFactory destinationFactory) -
start
- Specified by:
startin interfaceorg.apache.activemq.Service- Overrides:
startin classEmptyBroker- Throws:
Exception
-
stop
- Specified by:
stopin interfaceorg.apache.activemq.Service- Overrides:
stopin classEmptyBroker- Throws:
Exception
-
getDestinationPolicy
-
getConnectionContext
-
addConnection
public void addConnection(ConnectionContext context, org.apache.activemq.command.ConnectionInfo info) throws Exception Description copied from interface:BrokerA client is establishing a connection with the broker.- Specified by:
addConnectionin interfaceBroker- Overrides:
addConnectionin classEmptyBroker- Throws:
Exception- TODO
-
removeConnection
public void removeConnection(ConnectionContext context, org.apache.activemq.command.ConnectionInfo info, Throwable error) throws Exception Description copied from interface:BrokerA client is disconnecting from the broker.- Specified by:
removeConnectionin interfaceBroker- Overrides:
removeConnectionin classEmptyBroker- Parameters:
context- the environment the operation is being executed under.info- metadata about the Brokererror- null if the client requested the disconnect or the error that caused the client to disconnect.- Throws:
Exception- TODO
-
isEqual
protected boolean isEqual(org.apache.activemq.command.ConnectionId connectionId, org.apache.activemq.command.ConnectionId connectionId2) -
getClients
- Specified by:
getClientsin interfaceBroker- Overrides:
getClientsin classEmptyBroker- Returns:
- all clients added to the Broker.
- Throws:
Exception- TODO
-
addDestination
public Destination addDestination(ConnectionContext context, org.apache.activemq.command.ActiveMQDestination destination, boolean createIfTemp) throws Exception Description copied from interface:RegionUsed to create a destination. Usually, this method is invoked as a side-effect of sending a message to a destination that does not exist yet.- Specified by:
addDestinationin interfaceRegion- Overrides:
addDestinationin classEmptyBrokerdestination- the destination to create.- Returns:
- TODO
- Throws:
Exception- TODO
-
removeDestination
public void removeDestination(ConnectionContext context, org.apache.activemq.command.ActiveMQDestination destination, long timeout) throws Exception Description copied from interface:RegionUsed to destroy a destination. This should try to quiesce use of the destination up to the timeout allotted time before removing the destination. This will remove all persistent messages associated with the destination.- Specified by:
removeDestinationin interfaceRegion- Overrides:
removeDestinationin classEmptyBroker- Parameters:
context- the environment the operation is being executed under.destination- what is being removed from the broker.timeout- the max amount of time to wait for the destination to quiesce- Throws:
Exception- TODO
-
addDestinationInfo
public void addDestinationInfo(ConnectionContext context, org.apache.activemq.command.DestinationInfo info) throws Exception Description copied from interface:BrokerAdd and process a DestinationInfo object- Specified by:
addDestinationInfoin interfaceBroker- Overrides:
addDestinationInfoin classEmptyBroker- Parameters:
context- connection contextinfo- destination info- Throws:
Exception- TODO
-
removeDestinationInfo
public void removeDestinationInfo(ConnectionContext context, org.apache.activemq.command.DestinationInfo info) throws Exception Description copied from interface:BrokerRemove and process a DestinationInfo object- Specified by:
removeDestinationInfoin interfaceBroker- Overrides:
removeDestinationInfoin classEmptyBroker- Parameters:
context- connection contextinfo- destination info- Throws:
Exception- TODO
-
getDestinations
- Specified by:
getDestinationsin interfaceBroker- Overrides:
getDestinationsin classEmptyBroker- Returns:
- all destinations added to the Broker.
- Throws:
Exception- TODO
-
addProducer
public void addProducer(ConnectionContext context, org.apache.activemq.command.ProducerInfo info) throws Exception Description copied from interface:BrokerAdds a producer.- Specified by:
addProducerin interfaceBroker- Specified by:
addProducerin interfaceRegion- Overrides:
addProducerin classEmptyBroker- Parameters:
context- the environment the operation is being executed under.- Throws:
Exception- TODO
-
removeProducer
public void removeProducer(ConnectionContext context, org.apache.activemq.command.ProducerInfo info) throws Exception Description copied from interface:BrokerRemoves a producer.- Specified by:
removeProducerin interfaceBroker- Specified by:
removeProducerin interfaceRegion- Overrides:
removeProducerin classEmptyBroker- Parameters:
context- the environment the operation is being executed under.- Throws:
Exception- TODO
-
addConsumer
public Subscription addConsumer(ConnectionContext context, org.apache.activemq.command.ConsumerInfo info) throws Exception Description copied from interface:RegionAdds a consumer.- Specified by:
addConsumerin interfaceRegion- Overrides:
addConsumerin classEmptyBroker- Parameters:
context- the environment the operation is being executed under.- Returns:
- TODO
- Throws:
Exception- TODO
-
removeConsumer
public void removeConsumer(ConnectionContext context, org.apache.activemq.command.ConsumerInfo info) throws Exception Description copied from interface:RegionRemoves a consumer.- Specified by:
removeConsumerin interfaceRegion- Overrides:
removeConsumerin classEmptyBroker- Parameters:
context- the environment the operation is being executed under.- Throws:
Exception- TODO
-
removeSubscription
public void removeSubscription(ConnectionContext context, org.apache.activemq.command.RemoveSubscriptionInfo info) throws Exception Description copied from interface:RegionDeletes a durable subscription.- Specified by:
removeSubscriptionin interfaceRegion- Overrides:
removeSubscriptionin classEmptyBroker- Parameters:
context- the environment the operation is being executed under.info- TODO- Throws:
Exception- TODO
-
send
public void send(ProducerBrokerExchange producerExchange, org.apache.activemq.command.Message message) throws Exception Description copied from interface:RegionSend a message to the broker to using the specified destination. The destination specified in the message does not need to match the destination the message is sent to. This is handy in case the message is being sent to a dead letter destination.- Specified by:
sendin interfaceRegion- Overrides:
sendin classEmptyBroker- Parameters:
producerExchange- the environment the operation is being executed under.- Throws:
Exception- TODO
-
acknowledge
public void acknowledge(ConsumerBrokerExchange consumerExchange, org.apache.activemq.command.MessageAck ack) throws Exception Description copied from interface:RegionUsed to acknowledge the receipt of a message by a client.- Specified by:
acknowledgein interfaceRegion- Overrides:
acknowledgein classEmptyBroker- Parameters:
consumerExchange- the environment the operation is being executed under.- Throws:
Exception- TODO
-
getRegion
public Region getRegion(org.apache.activemq.command.ActiveMQDestination destination) throws jakarta.jms.JMSException - Throws:
jakarta.jms.JMSException
-
messagePull
public org.apache.activemq.command.Response messagePull(ConnectionContext context, org.apache.activemq.command.MessagePull pull) throws Exception Description copied from interface:RegionAllows a consumer to pull a message from a queue- Specified by:
messagePullin interfaceRegion- Overrides:
messagePullin classEmptyBroker- Throws:
Exception
-
getPreparedTransactions
public org.apache.activemq.command.TransactionId[] getPreparedTransactions(ConnectionContext context) throws Exception Description copied from interface:BrokerGets a list of all the prepared xa transactions.- Specified by:
getPreparedTransactionsin interfaceBroker- Overrides:
getPreparedTransactionsin classEmptyBroker- Parameters:
context- transaction ids- Returns:
- array of TransactionId values
- Throws:
Exception- TODO
-
beginTransaction
public void beginTransaction(ConnectionContext context, org.apache.activemq.command.TransactionId xid) throws Exception Description copied from interface:BrokerStarts a transaction.- Specified by:
beginTransactionin interfaceBroker- Overrides:
beginTransactionin classEmptyBroker- Parameters:
context- connection contextxid- transaction id- Throws:
Exception- TODO
-
prepareTransaction
public int prepareTransaction(ConnectionContext context, org.apache.activemq.command.TransactionId xid) throws Exception Description copied from interface:BrokerPrepares a transaction. Only valid for xa transactions.- Specified by:
prepareTransactionin interfaceBroker- Overrides:
prepareTransactionin classEmptyBroker- Parameters:
context- connection contextxid- transaction id- Returns:
- id
- Throws:
Exception- TODO
-
rollbackTransaction
public void rollbackTransaction(ConnectionContext context, org.apache.activemq.command.TransactionId xid) throws Exception Description copied from interface:BrokerRollback a transaction.- Specified by:
rollbackTransactionin interfaceBroker- Overrides:
rollbackTransactionin classEmptyBroker- Parameters:
context- connection contextxid- transaction id- Throws:
Exception- TODO
-
commitTransaction
public void commitTransaction(ConnectionContext context, org.apache.activemq.command.TransactionId xid, boolean onePhase) throws Exception Description copied from interface:BrokerCommits a transaction.- Specified by:
commitTransactionin interfaceBroker- Overrides:
commitTransactionin classEmptyBroker- Parameters:
context- connection contextxid- transaction idonePhase- is COMMIT_ONE_PHASE- Throws:
Exception- TODO
-
forgetTransaction
public void forgetTransaction(ConnectionContext context, org.apache.activemq.command.TransactionId transactionId) throws Exception Description copied from interface:BrokerForgets a transaction.- Specified by:
forgetTransactionin interfaceBroker- Overrides:
forgetTransactionin classEmptyBroker- Parameters:
context- connection contexttransactionId- transaction id- Throws:
Exception- TODO
-
gc
public void gc()- Specified by:
gcin interfaceRegion- Overrides:
gcin classEmptyBroker
-
getBrokerId
public org.apache.activemq.command.BrokerId getBrokerId()Description copied from interface:BrokerGet the id of the broker- Specified by:
getBrokerIdin interfaceBroker- Overrides:
getBrokerIdin classEmptyBroker
-
setBrokerId
public void setBrokerId(org.apache.activemq.command.BrokerId brokerId) -
getBrokerName
Description copied from interface:BrokerGet the name of the broker- Specified by:
getBrokerNamein interfaceBroker- Overrides:
getBrokerNamein classEmptyBroker
-
setBrokerName
-
getDestinationStatistics
-
createUnknownDestinationTypeException
protected jakarta.jms.JMSException createUnknownDestinationTypeException(org.apache.activemq.command.ActiveMQDestination destination) -
addBroker
Description copied from interface:BrokerA remote Broker connects- Specified by:
addBrokerin interfaceBroker- Overrides:
addBrokerin classEmptyBroker
-
removeBroker
Description copied from interface:BrokerRemove a BrokerInfo- Specified by:
removeBrokerin interfaceBroker- Overrides:
removeBrokerin classEmptyBroker- Parameters:
connection- Broker connectioninfo- metadata about the Broker
-
getPeerBrokerInfos
public org.apache.activemq.command.BrokerInfo[] getPeerBrokerInfos()Description copied from interface:BrokerGet the BrokerInfo's of any connected Brokers- Specified by:
getPeerBrokerInfosin interfaceBroker- Overrides:
getPeerBrokerInfosin classEmptyBroker- Returns:
- array of peer BrokerInfos
-
preProcessDispatch
public void preProcessDispatch(org.apache.activemq.command.MessageDispatch messageDispatch) Description copied from interface:BrokerNotify the Broker that a dispatch is going to happen- Specified by:
preProcessDispatchin interfaceBroker- Overrides:
preProcessDispatchin classEmptyBroker- Parameters:
messageDispatch- MessageDispatch object being dispatched
-
postProcessDispatch
public void postProcessDispatch(org.apache.activemq.command.MessageDispatch messageDispatch) Description copied from interface:BrokerNotify the Broker that a dispatch has happened- Specified by:
postProcessDispatchin interfaceBroker- Overrides:
postProcessDispatchin classEmptyBroker- Parameters:
messageDispatch- MessageDispatch that has dispatched
-
processDispatchNotification
public void processDispatchNotification(org.apache.activemq.command.MessageDispatchNotification messageDispatchNotification) throws Exception Description copied from interface:RegionProcess a notification of a dispatch - used by a Slave Broker- Specified by:
processDispatchNotificationin interfaceRegion- Overrides:
processDispatchNotificationin classEmptyBroker- Throws:
Exception- TODO
-
isStopped
public boolean isStopped()- Specified by:
isStoppedin interfaceBroker- Overrides:
isStoppedin classEmptyBroker- Returns:
- true if the broker has stopped
-
getDurableDestinations
- Specified by:
getDurableDestinationsin interfaceBroker- Overrides:
getDurableDestinationsin classEmptyBroker- Returns:
- a Set of all durable destinations
-
doStop
protected void doStop(org.apache.activemq.util.ServiceStopper ss) -
isKeepDurableSubsActive
public boolean isKeepDurableSubsActive() -
setKeepDurableSubsActive
public void setKeepDurableSubsActive(boolean keepDurableSubsActive) -
getDestinationInterceptor
-
getAdminConnectionContext
- Specified by:
getAdminConnectionContextin interfaceBroker- Overrides:
getAdminConnectionContextin classEmptyBroker- Returns:
- the connection context used to make administration operations on startup or via JMX MBeans
-
setAdminConnectionContext
Description copied from interface:BrokerSets the default administration connection context used when configuring the broker on startup or via JMX- Specified by:
setAdminConnectionContextin interfaceBroker- Overrides:
setAdminConnectionContextin classEmptyBroker- Parameters:
adminConnectionContext- default administration connection context
-
getConnectionStates
public Map<org.apache.activemq.command.ConnectionId,org.apache.activemq.state.ConnectionState> getConnectionStates() -
getTempDataStore
- Specified by:
getTempDataStorein interfaceBroker- Overrides:
getTempDataStorein classEmptyBroker- Returns:
- the temp data store
-
getVmConnectorURI
- Specified by:
getVmConnectorURIin interfaceBroker- Overrides:
getVmConnectorURIin classEmptyBroker- Returns:
- the URI that can be used to connect to the local Broker
-
brokerServiceStarted
public void brokerServiceStarted()Description copied from interface:Brokercalled when the brokerService starts- Specified by:
brokerServiceStartedin interfaceBroker- Overrides:
brokerServiceStartedin classEmptyBroker
-
getBrokerService
- Specified by:
getBrokerServicein interfaceBroker- Overrides:
getBrokerServicein classEmptyBroker- Returns:
- the BrokerService
-
isExpired
public boolean isExpired(org.apache.activemq.broker.region.MessageReference messageReference) Description copied from interface:BrokerDetermine if a message has expired -allows default behaviour to be overridden - as the timestamp set by the producer can be out of sync with the broker- Specified by:
isExpiredin interfaceBroker- Overrides:
isExpiredin classEmptyBroker- Parameters:
messageReference- message reference- Returns:
- true if the message is expired
-
messageExpired
public void messageExpired(ConnectionContext context, org.apache.activemq.broker.region.MessageReference node, Subscription subscription) Description copied from interface:BrokerA Message has Expired- Specified by:
messageExpiredin interfaceBroker- Overrides:
messageExpiredin classEmptyBroker- Parameters:
context- connection contextnode- message referencesubscription- (maybe null)
-
sendToDeadLetterQueue
public boolean sendToDeadLetterQueue(ConnectionContext context, org.apache.activemq.broker.region.MessageReference node, Subscription subscription, Throwable poisonCause) Description copied from interface:BrokerA message needs to go to the DLQ- Specified by:
sendToDeadLetterQueuein interfaceBroker- Overrides:
sendToDeadLetterQueuein classEmptyBroker- Parameters:
context- connection contextnode- message referencepoisonCause- reason for dlq submission, may be null- Returns:
- true if Message was placed in a DLQ false if discarded.
-
getRoot
Description copied from interface:BrokerEnsure we get the Broker at the top of the Stack- Specified by:
getRootin interfaceBroker- Overrides:
getRootin classEmptyBroker- Returns:
- the broker at the top of the Stack
-
getBrokerSequenceId
public long getBrokerSequenceId()- Specified by:
getBrokerSequenceIdin interfaceBroker- Overrides:
getBrokerSequenceIdin classEmptyBroker- Returns:
- the broker sequence id
-
getScheduler
public org.apache.activemq.thread.Scheduler getScheduler()Description copied from interface:Brokercalled to get scheduler for executing TimerTask- Specified by:
getSchedulerin interfaceBroker- Overrides:
getSchedulerin classEmptyBroker
-
getExecutor
Description copied from interface:Brokercalled to get Java thread pool executor- Specified by:
getExecutorin interfaceBroker- Overrides:
getExecutorin classEmptyBroker
-
processConsumerControl
public void processConsumerControl(ConsumerBrokerExchange consumerExchange, org.apache.activemq.command.ConsumerControl control) - Specified by:
processConsumerControlin interfaceRegion- Overrides:
processConsumerControlin classEmptyBroker
-
addBrokerInClusterUpdate
protected void addBrokerInClusterUpdate(org.apache.activemq.command.BrokerInfo info) -
removeBrokerInClusterUpdate
protected void removeBrokerInClusterUpdate(org.apache.activemq.command.BrokerInfo info) -
purgeInactiveDestinations
protected void purgeInactiveDestinations() -
isAllowTempAutoCreationOnSend
public boolean isAllowTempAutoCreationOnSend() -
setAllowTempAutoCreationOnSend
public void setAllowTempAutoCreationOnSend(boolean allowTempAutoCreationOnSend) -
reapplyInterceptor
public void reapplyInterceptor()- Specified by:
reapplyInterceptorin interfaceRegion- Overrides:
reapplyInterceptorin classEmptyBroker
-