[英]Spring Integration + Spring AMQP: How can I passing MessageProperties to int:service-activator?
Configs like this: 像这样的配置:
<int-amqp:inbound-channel-adapter connection-factory="connectionFactory" queue-names="#{prop['mq.queue.logging']}"
channel="emailLoggingChannel" message-converter="jsonMessageConverter" error-channel="errorChannel" />
<int:channel id="emailLoggingChannel"/>
<int:service-activator id="handleEmailLogging" input-channel="emailLoggingChannel"
ref="emailLoggingService" method="insertOrUpdate"/>
My question is: How can I passing properties of AMQP message to int:service-activator? 我的问题是:如何将AMQP消息的属性传递给int:service-activator?
Appreciated. 赞赏。
The AMQP MessageProperties
are mepped to the MessageHeaders
. AMQP
MessageProperties
插入到MessageHeaders
。
By default only standard AMQP properties (headers) are mepped. 默认情况下,仅使用标准AMQP属性(标题)。
To map all of them including any custom properties you should use this 要映射所有它们,包括任何自定义属性,您应该使用此
mapped-request-headers="*"
for the <int-amqp:inbound-channel-adapter>
. 对于
<int-amqp:inbound-channel-adapter>
。
See more info in the Reference Manual . 请参阅《 参考手册》中的更多信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.