spring-projects / spring-projects/spring-batch

Make Destination of JmsItemReader and JmsItemWriter configurable [BATCH-2726]

Open
#878 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: core status: waiting-for-reporter status: waiting-for-triage type: enhancement
Dominant language
Java
Stars
3k
Forks
2.5k
Avg merge
6d 53m
Merged PRs (30d)
3

Description

All Wissender opened BATCH-2726 and commented

The javadoc of JmsItemReader states the following:

An {@link ItemReader} for JMS using a {@link JmsTemplate}. The template should have a default destination, which will be used to provide items in {@link #read()}.

That means that I have to create an own JmsTemplate for every queue. Is this recommended?

Otherwise I see no reason why it shouldn't be possible to specify an explicit destination for JmsItemReader and JmsItemWriter via property. The method JmsTemplate#receiveAndConvert() provides overloaded variations with Destination destination and String destination which could be called, when the (newly introduced) destination property on the JmsItemReader respectively JmsItemWriter is not null.


Affects: 3.0.8

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating JmsItemReader and JmsItemWriter and reading how each currently uses JmsTemplate. Review the JmsTemplate receiveAndConvert overloads mentioned in the issue. Done means both components can use an explicit destination while preserving the template's default destination behavior when none is configured.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.