像这样的配置:
<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"/>
我的问题是:
如何将 AMQP 消息的属性传递给 int:service-activator?
赞赏。
最佳答案
AMQP MessageProperties
被memp到MessageHeaders
.
默认情况下,仅修改标准 AMQP 属性( header )。
要映射所有这些,包括任何自定义属性,您应该使用它
mapped-request-headers="*"
对于 <int-amqp:inbound-channel-adapter>
.
查看更多信息Reference Manual .
关于java - Spring集成+Spring AMQP : How can I passing MessageProperties to int:service-activator?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25113554/