我们正在开发一种服务,用于侦听或使用RabbitMQ队列中的消息。消息从Apache Nifi分发到消息队列(例如,队列名称为“ workitems”)。
现在,我想使用Spring Integration查看一个代码片段,以侦听和处理从Apache Nifi队列(RabbitMQ)中分派的消息。
谢谢!
听起来您需要Spring Integration的AMQP通道适配器:https://docs.spring.io/spring-integration/docs/5.3.0.M4/reference/html/amqp.html#amqp-inbound-channel-adapter
这是此事的样本:https://github.com/spring-projects/spring-integration-samples/tree/master/basic/amqp