Skip to content

ChunkMessageChannelItemWriter Reply Channel Issues [BATCH-2507] #1096

@spring-projects-issues

Description

@spring-projects-issues

Gary Russell opened BATCH-2507 and commented

The ChunkMessageChannelItemWriter won't work in a multi-threaded environment, even when using step scope - all requests are sharing the same reply channel.

The handler should be using a replyChannel header (one per step) instead of referencing a channel in the application context.

See similar code in the MessageChannelPartitionHandler which was fixed to use a unique queue for each new request.

Even there, I'm not sure there's ever a valid case for explicitly injecting a shared channel.


Affects: 3.0.7

Reference URL: http://stackoverflow.com/questions/37332048/spring-batch-how-to-configure-remote-chunking-for-multiple-jobs-running-in-a-t

Issue Links:

  • BATCH-2228 Remote-chunking implementation does not support parallel executions of the same job
    ("duplicates")
  • BATCH-2508 ChunkMessageChannelItemWriter Reply Channel Issues
    ("is duplicated by")

3 votes, 5 watchers

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions