public class MessageProperties extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static String |
BATCH_FORMAT_LENGTH_HEADER4 |
static String |
CONTENT_TYPE_BYTES |
static String |
CONTENT_TYPE_JSON |
static String |
CONTENT_TYPE_JSON_ALT |
static String |
CONTENT_TYPE_SERIALIZED_OBJECT |
static String |
CONTENT_TYPE_TEXT_PLAIN |
static String |
CONTENT_TYPE_XML |
static String |
DEFAULT_CONTENT_TYPE |
static MessageDeliveryMode |
DEFAULT_DELIVERY_MODE |
static Integer |
DEFAULT_PRIORITY |
static String |
SPRING_AUTO_DECOMPRESS |
static String |
SPRING_BATCH_FORMAT |
static String |
X_DELAY |
Constructor and Description |
---|
MessageProperties() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
String |
getAppId() |
String |
getClusterId() |
String |
getConsumerQueue() |
String |
getConsumerTag() |
String |
getContentEncoding() |
long |
getContentLength() |
String |
getContentType() |
String |
getCorrelationId()
Get the correlation id.
|
Integer |
getDelay()
The x-delay header (outbound).
|
MessageDeliveryMode |
getDeliveryMode() |
long |
getDeliveryTag() |
String |
getExpiration() |
<T> T |
getHeader(String headerName)
Typed getter for a header.
|
Map<String,Object> |
getHeaders() |
Type |
getInferredArgumentType()
The inferred target argument type when using a method-level
@RabbitListener . |
Integer |
getMessageCount()
Return the server's most recent estimate of the number of messages remaining on the queue.
|
String |
getMessageId() |
Integer |
getPriority() |
long |
getPublishSequenceNumber()
Return the publish sequence number if publisher confirms are enabled; set by the template.
|
Integer |
getReceivedDelay()
When a delayed message exchange is used the x-delay header on a
received message contains the delay.
|
MessageDeliveryMode |
getReceivedDeliveryMode() |
String |
getReceivedExchange() |
String |
getReceivedRoutingKey() |
String |
getReceivedUserId()
Return the user id from an incoming message.
|
Boolean |
getRedelivered() |
String |
getReplyTo() |
Address |
getReplyToAddress() |
Object |
getTargetBean()
The target bean when using
@RabbitListener . |
Method |
getTargetMethod()
The target method when using a
@RabbitListener . |
Date |
getTimestamp() |
String |
getType() |
String |
getUserId() |
List<Map<String,?>> |
getXDeathHeader()
Return the x-death header.
|
int |
hashCode() |
protected boolean |
isContentLengthSet() |
protected boolean |
isDeliveryTagSet() |
boolean |
isFinalRetryForMessageWithNoId() |
boolean |
isLastInBatch()
When true; the message having these properties is the last message from a batch.
|
Boolean |
isRedelivered() |
void |
setAppId(String appId) |
void |
setClusterId(String clusterId) |
void |
setConsumerQueue(String consumerQueue) |
void |
setConsumerTag(String consumerTag) |
void |
setContentEncoding(String contentEncoding) |
void |
setContentLength(long contentLength) |
void |
setContentType(String contentType) |
void |
setCorrelationId(String correlationId)
Set the correlation id.
|
void |
setDelay(Integer delay)
Set the x-delay header.
|
void |
setDeliveryMode(MessageDeliveryMode deliveryMode) |
void |
setDeliveryTag(long deliveryTag) |
void |
setExpiration(String expiration) |
void |
setFinalRetryForMessageWithNoId(boolean finalRetryForMessageWithNoId) |
void |
setHeader(String key,
Object value) |
void |
setInferredArgumentType(Type inferredArgumentType)
Set the inferred target argument type when using a method-level
@RabbitListener . |
void |
setLastInBatch(boolean lastInBatch)
Set to true to indicate these properties are for the last message in a batch.
|
void |
setMessageCount(Integer messageCount)
Set the message count.
|
void |
setMessageId(String messageId) |
void |
setPriority(Integer priority) |
void |
setPublishSequenceNumber(long publishSequenceNumber)
Set the publish sequence number, if publisher confirms are enabled; set by the template.
|
void |
setReceivedDelay(Integer receivedDelay)
When a delayed message exchange is used the x-delay header on a
received message contains the delay.
|
void |
setReceivedDeliveryMode(MessageDeliveryMode receivedDeliveryMode) |
void |
setReceivedExchange(String receivedExchange) |
void |
setReceivedRoutingKey(String receivedRoutingKey) |
void |
setReceivedUserId(String receivedUserId) |
void |
setRedelivered(Boolean redelivered) |
void |
setReplyTo(String replyTo) |
void |
setReplyToAddress(Address replyTo) |
void |
setTargetBean(Object targetBean)
Set the target bean when using
@RabbitListener . |
void |
setTargetMethod(Method targetMethod)
Set the target method when using a
@RabbitListener . |
void |
setTimestamp(Date timestamp) |
void |
setType(String type) |
void |
setUserId(String userId) |
String |
toString() |
public static final String CONTENT_TYPE_BYTES
public static final String CONTENT_TYPE_TEXT_PLAIN
public static final String CONTENT_TYPE_SERIALIZED_OBJECT
public static final String CONTENT_TYPE_JSON
public static final String CONTENT_TYPE_JSON_ALT
public static final String CONTENT_TYPE_XML
public static final String SPRING_BATCH_FORMAT
public static final String BATCH_FORMAT_LENGTH_HEADER4
public static final String SPRING_AUTO_DECOMPRESS
public static final String X_DELAY
public static final String DEFAULT_CONTENT_TYPE
public static final MessageDeliveryMode DEFAULT_DELIVERY_MODE
public static final Integer DEFAULT_PRIORITY
public <T> T getHeader(String headerName)
T
- the type.headerName
- the header name.public void setTimestamp(Date timestamp)
public Date getTimestamp()
public void setMessageId(String messageId)
public String getMessageId()
public void setUserId(String userId)
public String getUserId()
public String getReceivedUserId()
public void setReceivedUserId(String receivedUserId)
public void setAppId(String appId)
public String getAppId()
public void setClusterId(String clusterId)
public String getClusterId()
public void setType(String type)
public String getType()
public void setCorrelationId(String correlationId)
correlationId
- the id.public String getCorrelationId()
public void setReplyTo(String replyTo)
public String getReplyTo()
public void setReplyToAddress(Address replyTo)
public Address getReplyToAddress()
public void setContentType(String contentType)
public String getContentType()
public void setContentEncoding(String contentEncoding)
public String getContentEncoding()
public void setContentLength(long contentLength)
public long getContentLength()
protected final boolean isContentLengthSet()
public void setDeliveryMode(MessageDeliveryMode deliveryMode)
public MessageDeliveryMode getDeliveryMode()
public MessageDeliveryMode getReceivedDeliveryMode()
public void setReceivedDeliveryMode(MessageDeliveryMode receivedDeliveryMode)
public void setExpiration(String expiration)
public String getExpiration()
public void setPriority(Integer priority)
public Integer getPriority()
public void setReceivedExchange(String receivedExchange)
public String getReceivedExchange()
public void setReceivedRoutingKey(String receivedRoutingKey)
public String getReceivedRoutingKey()
public Integer getReceivedDelay()
getDelay()
public void setReceivedDelay(Integer receivedDelay)
receivedDelay
- the received delay.public void setRedelivered(Boolean redelivered)
public Boolean isRedelivered()
public Boolean getRedelivered()
public void setDeliveryTag(long deliveryTag)
public long getDeliveryTag()
protected final boolean isDeliveryTagSet()
public void setMessageCount(Integer messageCount)
messageCount
- the countgetMessageCount()
public Integer getMessageCount()
basicGet
.public String getConsumerTag()
public void setConsumerTag(String consumerTag)
public String getConsumerQueue()
public void setConsumerQueue(String consumerQueue)
public Integer getDelay()
getReceivedDelay()
public void setDelay(Integer delay)
delay
- the delay.public boolean isFinalRetryForMessageWithNoId()
public void setFinalRetryForMessageWithNoId(boolean finalRetryForMessageWithNoId)
public long getPublishSequenceNumber()
public void setPublishSequenceNumber(long publishSequenceNumber)
publishSequenceNumber
- the sequence number.public Type getInferredArgumentType()
@RabbitListener
.public void setInferredArgumentType(Type inferredArgumentType)
@RabbitListener
.inferredArgumentType
- the type.public Method getTargetMethod()
@RabbitListener
.public void setTargetMethod(Method targetMethod)
@RabbitListener
.targetMethod
- the target method.public Object getTargetBean()
@RabbitListener
.public void setTargetBean(Object targetBean)
@RabbitListener
.targetBean
- the bean.public boolean isLastInBatch()
public void setLastInBatch(boolean lastInBatch)
lastInBatch
- true for the last.public List<Map<String,?>> getXDeathHeader()