org.apache.activemq.command
Class MessageAck
java.lang.Object
org.apache.activemq.command.BaseCommand
org.apache.activemq.command.MessageAck
- All Implemented Interfaces:
- Command, DataStructure
public class MessageAck
- extends BaseCommand
- Version:
- $Revision: 1.11 $
Methods inherited from class org.apache.activemq.command.BaseCommand |
copy, getCommandId, getFrom, getTo, isBrokerInfo, isMarshallAware, isMessage, isMessageDispatch, isMessageDispatchNotification, isResponse, isResponseRequired, isShutdownInfo, isWireFormatInfo, setCommandId, setFrom, setResponseRequired, setTo, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DATA_STRUCTURE_TYPE
public static final byte DATA_STRUCTURE_TYPE
- See Also:
- Constant Field Values
DELIVERED_ACK_TYPE
public static final byte DELIVERED_ACK_TYPE
- Used to let the broker know that the message has been delivered to the
client. Message will still be retained until an standard ack is received.
This is used get the broker to send more messages past prefetch limits when
an standard ack has not been sent.
- See Also:
- Constant Field Values
STANDARD_ACK_TYPE
public static final byte STANDARD_ACK_TYPE
- The standard ack case where a client wants the message to be discarded.
- See Also:
- Constant Field Values
POSION_ACK_TYPE
public static final byte POSION_ACK_TYPE
- In case the client want's to explicitly let the broker know that a
message was not processed and the message was considered a poison message.
- See Also:
- Constant Field Values
ackType
protected byte ackType
consumerId
protected ConsumerId consumerId
firstMessageId
protected MessageId firstMessageId
lastMessageId
protected MessageId lastMessageId
destination
protected ActiveMQDestination destination
transactionId
protected TransactionId transactionId
messageCount
protected int messageCount
consumerKey
protected transient java.lang.String consumerKey
MessageAck
public MessageAck()
MessageAck
public MessageAck(MessageDispatch md,
byte ackType,
int messageCount)
copy
public void copy(MessageAck copy)
getDataStructureType
public byte getDataStructureType()
- Returns:
- The type of the data structure
isMessageAck
public boolean isMessageAck()
- Specified by:
isMessageAck
in interface Command
- Overrides:
isMessageAck
in class BaseCommand
isPoisonAck
public boolean isPoisonAck()
isStandardAck
public boolean isStandardAck()
isDeliveredAck
public boolean isDeliveredAck()
getDestination
public ActiveMQDestination getDestination()
setDestination
public void setDestination(ActiveMQDestination destination)
getTransactionId
public TransactionId getTransactionId()
setTransactionId
public void setTransactionId(TransactionId transactionId)
isInTransaction
public boolean isInTransaction()
getConsumerId
public ConsumerId getConsumerId()
setConsumerId
public void setConsumerId(ConsumerId consumerId)
getAckType
public byte getAckType()
setAckType
public void setAckType(byte ackType)
getFirstMessageId
public MessageId getFirstMessageId()
setFirstMessageId
public void setFirstMessageId(MessageId firstMessageId)
getLastMessageId
public MessageId getLastMessageId()
setLastMessageId
public void setLastMessageId(MessageId lastMessageId)
getMessageCount
public int getMessageCount()
- The number of messages being acknowledged in the range.
setMessageCount
public void setMessageCount(int messageCount)
visit
public Response visit(CommandVisitor visitor)
throws java.lang.Exception
- Throws:
java.lang.Exception
setMessageID
public void setMessageID(MessageId messageID)
- A helper method to allow a single message ID to be acknowledged
Copyright © 2010 Apache Software Foundation. All Rights Reserved.