spring-cloud / spring-cloud/spring-cloud-stream
DefaultPollableMessageSource should execute `postSend` and `afterSendCompletion` interceptor methods
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 646
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 8
Description
Describe the issue
An object of the class DefaultPollableMessageSource can contain a list of ChannelInterceptor.
Currently, when a PollableMessageSource does poll, only the method preSend of the interceptors is called. See invoke method.
In order to be consistent with a "normal" consumer, it would be nice that the methods:
will be executed.
It would be nice that, preSend is executed before the user code is executed, and preSend and afterSendCompletion after the user code is executed.
Version of the framework
spring-cloud-stream: 4.2.0
spring-boot: 3.4.7
Contributor guide
No contributing guide indexed for this repository
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 in core/spring-cloud-stream/src/main/java/org/springframework/cloud/stream/binder/DefaultPollableMessageSource.java at the poll/invoke path linked in the issue, and compare its interceptor handling with ChannelInterceptor's postSend and afterSendCompletion methods. Done means a poll invokes the requested interceptor callbacks around user-code execution consistently with a normal consumer; the issue names no test file, so identify the relevant existing tests while reading.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100