I'm trying to read data from a queue (RabbitMq) using spring batch. But I can't find any example on the internet for guidance. Please help with an example spring batch reader and writer using AmqpItemReader and AmqpItemWriter respectively. XML configuration preferably.
Asked
Active
Viewed 1,397 times
2
-
Can you share source code if you were able to implement code? – PAA Jan 14 '21 at 14:55
1 Answers
-1
See the Spring AMQP Reference manual.
The reader and writer simply need an appropriately configured RabbitTemplate
.
Add a connection factory bean, queue, exhange, binding etc; wire up the template and inject it into the reader/writer using <constructor-arg/>
.

Gary Russell
- 166,535
- 14
- 146
- 179