spring-projects / spring-projects/spring-batch
Make Destination of JmsItemReader and JmsItemWriter configurable [BATCH-2726]
Nobody has claimed this yet.
- 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 {
@linkItemReader} for JMS using a {@linkJmsTemplate}. 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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