Package org.apache.activemq
Class ActiveMQMessageAudit
- java.lang.Object
-
- org.apache.activemq.ActiveMQMessageAuditNoSync
-
- org.apache.activemq.ActiveMQMessageAudit
-
- All Implemented Interfaces:
Serializable
public class ActiveMQMessageAudit extends ActiveMQMessageAuditNoSync
Provides basic audit functions for Messages- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.activemq.ActiveMQMessageAuditNoSync
DEFAULT_WINDOW_SIZE, MAXIMUM_PRODUCER_COUNT
-
-
Constructor Summary
Constructors Constructor Description ActiveMQMessageAudit()
Default Constructor windowSize = 2048, maximumNumberOfProducersToTrack = 64ActiveMQMessageAudit(int auditDepth, int maximumNumberOfProducersToTrack)
Construct a MessageAudit
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isDuplicate(String id)
checks whether this messageId has been seen before and adds this messageId to the listboolean
isDuplicate(MessageId id)
Checks if this messageId has been seen beforeboolean
isInOrder(String id)
Check the message id is in orderboolean
isInOrder(MessageId id)
Check the MessageId is in ordervoid
rollback(MessageId id)
mark this message as being receivedvoid
setMaximumNumberOfProducersToTrack(int maximumNumberOfProducersToTrack)
-
Methods inherited from class org.apache.activemq.ActiveMQMessageAuditNoSync
clear, getAuditDepth, getLastSeqId, getMaximumNumberOfProducersToTrack, isDuplicate, isDuplicate, isInOrder, isInOrder, isModified, modified, rollback, rollback, setAuditDepth, setModified
-
-
-
-
Constructor Detail
-
ActiveMQMessageAudit
public ActiveMQMessageAudit()
Default Constructor windowSize = 2048, maximumNumberOfProducersToTrack = 64
-
ActiveMQMessageAudit
public ActiveMQMessageAudit(int auditDepth, int maximumNumberOfProducersToTrack)
Construct a MessageAudit- Parameters:
auditDepth
- range of ids to trackmaximumNumberOfProducersToTrack
- number of producers expected in the system
-
-
Method Detail
-
isDuplicate
public boolean isDuplicate(String id)
Description copied from class:ActiveMQMessageAuditNoSync
checks whether this messageId has been seen before and adds this messageId to the list- Overrides:
isDuplicate
in classActiveMQMessageAuditNoSync
- Returns:
- true if the message is a duplicate
-
isDuplicate
public boolean isDuplicate(MessageId id)
Description copied from class:ActiveMQMessageAuditNoSync
Checks if this messageId has been seen before- Overrides:
isDuplicate
in classActiveMQMessageAuditNoSync
- Returns:
- true if the message is a duplicate
-
rollback
public void rollback(MessageId id)
Description copied from class:ActiveMQMessageAuditNoSync
mark this message as being received- Overrides:
rollback
in classActiveMQMessageAuditNoSync
-
isInOrder
public boolean isInOrder(String id)
Description copied from class:ActiveMQMessageAuditNoSync
Check the message id is in order- Overrides:
isInOrder
in classActiveMQMessageAuditNoSync
- Returns:
- true if the id is in order
-
isInOrder
public boolean isInOrder(MessageId id)
Description copied from class:ActiveMQMessageAuditNoSync
Check the MessageId is in order- Overrides:
isInOrder
in classActiveMQMessageAuditNoSync
- Returns:
- true if the id is in order
-
setMaximumNumberOfProducersToTrack
public void setMaximumNumberOfProducersToTrack(int maximumNumberOfProducersToTrack)
- Overrides:
setMaximumNumberOfProducersToTrack
in classActiveMQMessageAuditNoSync
- Parameters:
maximumNumberOfProducersToTrack
- the maximumNumberOfProducersToTrack to set
-
-