Question

I have seen the AmqpJobSample

http://docs.spring.io/spring-batch/spring-batch-samples/#AmqpJobFunctionalTests

It uses AmqpItemReader to read from rabbitmq message queue, processes it using message handler and then writes back to queue using AmqpItemWriter.

My use case is to, read items from listItemReader which I have implemented, then sends items to messaging queue which will be processed by consumers running on different servers (rabbitmq cluster) and those consumers will respond back whether the iterm are processed successfully or not for each item.

Then I will read it from message queue (in itemWriter) and if check the statuses of item processing and return the status from itemWriter if its successfull or will throw exception if it is failed.

My application is in PHP Symfony framework but I am introducing spring batch for batch process which is currently in shell script.

I am using spring batch to produce messages but my consumers are in PHP which runs on different servers. I just want to pass ids as a messages and want to process ids using PHP consumers on different servers.

How can I do remote chunking or partitioning?

http://docs.spring.io/spring-batch/reference/html/scalability.html

Are there any samples for remote chunking and partitioning using messaging e.g. RabbiyMq ?

How can I this using AmqpItemReader and AmqpItemWriter ? Do I need to use Request/Reply ? Can I set reply-to queue ? Whats the best way to do this ?

Was it helpful?

Solution

It sounds like you should be using remote chunking instead.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top