public class SimpleAmqpHeaderMapper extends AbstractHeaderMapper<MessageProperties> implements AmqpHeaderMapper
AmqpHeaderMapper
.
This implementation copies AMQP API headers (e.g. appId) to and from
MessageHeaders
.Any used-defined properties will also be copied
from an AMQP Message to a Message
, and any other headers on a Message (beyond the AMQP headers)
will likewise be copied to an AMQP Message. Those other headers will be
copied to the general headers of a MessageProperties
whereas the
AMQP API headers are passed to the appropriate setter methods (e.g.
MessageProperties.setAppId(java.lang.String)
.
Constants for the AMQP header keys are defined in AmqpHeaders
.
logger
Constructor and Description |
---|
SimpleAmqpHeaderMapper() |
Modifier and Type | Method and Description |
---|---|
void |
fromHeaders(MessageHeaders headers,
MessageProperties amqpMessageProperties) |
MessageHeaders |
toHeaders(MessageProperties amqpMessageProperties) |
fromHeaderName, getHeaderIfAvailable, setInboundPrefix, setOutboundPrefix, toHeaderName
public void fromHeaders(MessageHeaders headers, MessageProperties amqpMessageProperties)
fromHeaders
in interface HeaderMapper<MessageProperties>
public MessageHeaders toHeaders(MessageProperties amqpMessageProperties)
toHeaders
in interface HeaderMapper<MessageProperties>