public class MessageAck extends BaseCommand
Modifier and Type | Field and Description |
---|---|
protected byte |
ackType |
protected ConsumerId |
consumerId |
protected String |
consumerKey |
static byte |
DATA_STRUCTURE_TYPE |
static byte |
DELIVERED_ACK_TYPE
Used to let the broker know that the message has been delivered to the
client.
|
protected ActiveMQDestination |
destination |
static byte |
EXPIRED_ACK_TYPE
the case where a consumer does not dispatch because message has expired inflight
|
protected MessageId |
firstMessageId |
static byte |
INDIVIDUAL_ACK_TYPE
The ack case where a client wants only an individual message to be discarded.
|
protected MessageId |
lastMessageId |
protected int |
messageCount |
protected Throwable |
poisonCause |
static 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.
|
static byte |
REDELIVERED_ACK_TYPE
In case the client want's to explicitly let the broker know that a
message was not processed and it was re-delivered to the consumer
but it was not yet considered to be a poison message.
|
static byte |
STANDARD_ACK_TYPE
The standard ack case where a client wants the message to be discarded.
|
protected TransactionId |
transactionId |
static byte |
UNMATCHED_ACK_TYPE
The ack case where a durable topic subscription does not match a selector.
|
commandId, responseRequired
Constructor and Description |
---|
MessageAck() |
MessageAck(Message message,
byte ackType,
int messageCount) |
MessageAck(MessageDispatch md,
byte ackType,
int messageCount) |
Modifier and Type | Method and Description |
---|---|
void |
copy(MessageAck copy) |
byte |
getAckType() |
ConsumerId |
getConsumerId() |
byte |
getDataStructureType() |
ActiveMQDestination |
getDestination() |
MessageId |
getFirstMessageId() |
MessageId |
getLastMessageId() |
int |
getMessageCount()
The number of messages being acknowledged in the range.
|
Throwable |
getPoisonCause()
The cause of a poison ack, if a message listener
throws an exception it will be recorded here
|
TransactionId |
getTransactionId() |
boolean |
isDeliveredAck() |
boolean |
isExpiredAck() |
boolean |
isIndividualAck() |
boolean |
isInTransaction() |
boolean |
isMessageAck() |
boolean |
isPoisonAck() |
boolean |
isRedeliveredAck() |
boolean |
isStandardAck() |
boolean |
isUnmatchedAck() |
void |
setAckType(byte ackType) |
void |
setConsumerId(ConsumerId consumerId) |
void |
setDestination(ActiveMQDestination destination) |
void |
setFirstMessageId(MessageId firstMessageId) |
void |
setLastMessageId(MessageId lastMessageId) |
void |
setMessageCount(int messageCount) |
void |
setMessageID(MessageId messageID)
A helper method to allow a single message ID to be acknowledged
|
void |
setPoisonCause(Throwable poisonCause) |
void |
setTransactionId(TransactionId transactionId) |
Response |
visit(CommandVisitor visitor) |
copy, getCommandId, getFrom, getTo, isBrokerInfo, isConnectionControl, isConsumerControl, isMarshallAware, isMessage, isMessageDispatch, isMessageDispatchNotification, isResponse, isResponseRequired, isShutdownInfo, isWireFormatInfo, setCommandId, setFrom, setResponseRequired, setTo, toString, toString
public static final byte DATA_STRUCTURE_TYPE
public static final byte DELIVERED_ACK_TYPE
public static final byte STANDARD_ACK_TYPE
public static final byte POSION_ACK_TYPE
public static final byte REDELIVERED_ACK_TYPE
public static final byte INDIVIDUAL_ACK_TYPE
public static final byte UNMATCHED_ACK_TYPE
public static final byte EXPIRED_ACK_TYPE
protected byte ackType
protected ConsumerId consumerId
protected MessageId firstMessageId
protected MessageId lastMessageId
protected ActiveMQDestination destination
protected TransactionId transactionId
protected int messageCount
protected Throwable poisonCause
protected transient String consumerKey
public MessageAck()
public MessageAck(MessageDispatch md, byte ackType, int messageCount)
public MessageAck(Message message, byte ackType, int messageCount)
public void copy(MessageAck copy)
public byte getDataStructureType()
public boolean isMessageAck()
isMessageAck
in interface Command
isMessageAck
in class BaseCommand
public boolean isPoisonAck()
public boolean isStandardAck()
public boolean isDeliveredAck()
public boolean isRedeliveredAck()
public boolean isIndividualAck()
public boolean isUnmatchedAck()
public boolean isExpiredAck()
public ActiveMQDestination getDestination()
public void setDestination(ActiveMQDestination destination)
public TransactionId getTransactionId()
public void setTransactionId(TransactionId transactionId)
public boolean isInTransaction()
public ConsumerId getConsumerId()
public void setConsumerId(ConsumerId consumerId)
public byte getAckType()
public void setAckType(byte ackType)
public MessageId getFirstMessageId()
public void setFirstMessageId(MessageId firstMessageId)
public MessageId getLastMessageId()
public void setLastMessageId(MessageId lastMessageId)
public int getMessageCount()
public void setMessageCount(int messageCount)
public Throwable getPoisonCause()
public void setPoisonCause(Throwable poisonCause)
public Response visit(CommandVisitor visitor) throws Exception
Exception
public void setMessageID(MessageId messageID)
Copyright © 2005–2016 FuseSource, Corp.. All rights reserved.