Can we use AmqpItemReader and AmqpItermWriter for request/reply use case in spring batch?

vishal

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 ?

Gary Russell

It sounds like you should be using remote chunking instead.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

To read Excel can we use Spring batch?

From Dev

To read Excel can we use Spring batch?

From Dev

Can we use a CASE in BETWEEN

From Dev

Can we use more colors in batch script?

From Dev

Can we use Spring batch Item Reader and Writer on a file which needs to skip first and last line?

From Dev

Can we use single flatFileItemReader bean in multiple steps running in parallel in spring batch?

From Dev

How can I use Spring Batch with OSGI

From Dev

Can we use redux-batch-middleware with redux-observable?

From Dev

Can we use a CASE...WHEN inside SUBSTRING?

From Dev

Can we use camel case in java package naming?

From Dev

According to the Use case <<view reports>>, can we say that the diagram is correct?

From Dev

Why can't we use @Cacheable with static method in spring with ehcache?

From Dev

How can we use either of the validation in spring boot?

From Dev

Shall we use noexcept everywhere in this case?

From Dev

Can we use "#elif !" in c?

From Dev

When can we use async?

From Dev

Can we use deadlocks for anything?

From Dev

Can we use NOT IN on multiple columns?

From Dev

Can we use Dalvik with Tango

From Dev

Can we use NOT IN on multiple columns?

From Dev

Can we use classes as header

From Dev

Can we use Bourbon in Grails?

From Dev

Can we use reactJS with amCharts

From Dev

Can we use nedb with NativeScript?

From Dev

Can we use dynamic pipe?

From Dev

Use of multiple DataSources in Spring Batch

From Dev

How to configure mentioned use case using spring batch parallel step split flow?

From Dev

Use case of transaction in Spring AMQP

From Dev

Can I use replication for this case?