Skip to content

Add remote chunking sample #603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

fmbenhassine
Copy link
Contributor

@fmbenhassine fmbenhassine commented May 10, 2018

This PR resolves BATCH-2721. It adds a self contained remote chunking sample that uses an embedded JMS broker (for simplicity). Even though the broker is embedded, communication between the master and workers is still done through JMS queues and Spring Integration channels and messages are sent over the wire through a TCP port.

The sample in this PR will not only enrich the current collection of samples, but also serve as a basis to show the added value of the feature we are trying to implement in BATCH-2686.

This PR also fixes a few typos in the documentation section about remote chunking.

@fmbenhassine fmbenhassine force-pushed the remote-chunking-sample branch 2 times, most recently from dfe13ea to d559a92 Compare May 14, 2018 11:44
Copy link
Member

@mminella mminella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit picks I can fix on merge if you're ok with them.

*/

@Bean
public ItemWriter<Integer> itemWriter() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should, at a minimum, return ItemStreamWriter since the ChunkMessageChannelItemWriter does implement ItemStream. That being said, for components like this, I actually usually recommend returning the concrete type so that Spring can see all interfaces implemented.

/*
* Configure inbound flow (requests coming from the master)
*/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Odd space

/*
* Configure outbound flow (replies going to the master)
*/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Odd space

@fmbenhassine fmbenhassine force-pushed the remote-chunking-sample branch from d559a92 to 1ed5fa3 Compare May 17, 2018 12:16
@fmbenhassine
Copy link
Contributor Author

fmbenhassine commented May 17, 2018

Hi Michael,

Thank you for the review. I removed the extra spaces and made itemReader and itemWriter methods return concrete types.

Kr,
Mahmoud

@mminella
Copy link
Member

This PR leaves a activemq-data directory under spring-batch-samples that doesn't get cleaned up on a ./gradlew clean. I think that directory needs to be configured to be under a build directory.

This commit adds a self contained remote chunking sample that uses
an embedded JMS broker (for simplicity). Even though the broker is
embedded, communication between the master and workers is still done
through JMS queues and Spring Integration channels and messages are
sent over the wire through a TCP port.

This commit also fixes a few typos in the documentation section about
remote chunking.

Resolves BATCH-2721
@fmbenhassine fmbenhassine force-pushed the remote-chunking-sample branch from 1ed5fa3 to 8aad392 Compare May 17, 2018 19:10
@mminella
Copy link
Member

Rebased and merged as 026bbe0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants