Skip to content
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

[Core] Incorporate CancellationToken and/or IConsumerContext to the Consumer interfaces #246

Open
zarusz opened this issue Apr 12, 2024 · 0 comments
Assignees
Labels
Milestone

Comments

@zarusz
Copy link
Owner

zarusz commented Apr 12, 2024

Current state
We can get ahold of the CancellationToken and IConsumerContext by:

  • letting the consumer extend IConsumerContextAware
  • use consumers without interfaces

Problem
The current state in 2.x does not promote the use of CancellationToken-s and requires users to make an extra step to bring that into the consumers.

Proposal
Add the CancellationToken and/or IConsumerContext to the core IConsumer<T> / IRequestHandler<T, R>
interfaces.

Backward compatibility consideration
Is it worth doing it backward compatible (new interface and old would be maintained)?
The benefit is that users could easily update the library.
On the other hand it might be okay to break the interface (not much updates for users).
We would do this as part of 3.x release.

@zarusz zarusz added the Core label Apr 12, 2024
@zarusz zarusz added this to the 3.0.0 milestone Apr 12, 2024
@zarusz zarusz self-assigned this May 3, 2024
zarusz added a commit that referenced this issue May 12, 2024
…onsumer interfaces #246

Signed-off-by: Tomasz Maruszak <maruszaktomasz@gmail.com>
zarusz added a commit that referenced this issue May 24, 2024
…onsumer interfaces #246

Signed-off-by: Tomasz Maruszak <maruszaktomasz@gmail.com>
zarusz added a commit that referenced this issue May 26, 2024
…onsumer interfaces #246

Signed-off-by: Tomasz Maruszak <maruszaktomasz@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant