Skip to content

Conversation

@salfuen
Copy link
Collaborator

@salfuen salfuen commented Jun 18, 2025

Proposed solution changes interface IMessageHandler<T>
from:

Task Handle(T message, MessageHandlerContext context);

to

Task Handle(T message, MessageHandlerContext context, CancellationToken cancellationToken = default);

As mentioned by @toizo here: 102 this interface is a core component, and users will have to update their implementation (even though is set as default)
Another approach would be to have another interface (fx IAsyncMessageHandler) instead of changing IMessageHandler, but that will introduce its own complexities and doesn't really align with an async approach when working with tasks IMO.

I would suggest to have it as a breaking change on a future release.

@toizo
Copy link
Collaborator

toizo commented Jun 19, 2025

Perhaps we can make some beta release first and have your team test it out?

Even though I see that the change makes sense, I am a little afraid of just going ahead with it and breaking dafda for everyone. On one hand, we are still somewhere in v0.1 world so breaking changes should be expected, but on the other, dafda api has been stable for years now…

Impediments before a stable release can be made:

  • the repo contains example projects that might be broken now and will need an update
  • there is a documentation that might need an update

Btw, the software committee (new dafda owners) has just started a talk towards dafda v1.0 roadmap - there will be possibly some more breaking changes released with version 1, and this could be one of them.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a script for updating the version, we will do it after the PR is merged

@toizo
Copy link
Collaborator

toizo commented Jul 7, 2025

I released this as beta 0.13.0-beta1, so you can try it out in your team.

Did you have a time to go through the documentation?
Do you know if something needs to be updated there?

@salfuen
Copy link
Collaborator Author

salfuen commented Jul 7, 2025

I released this as beta 0.13.0-beta1, so you can try it out in your team.

Did you have a time to go through the documentation? Do you know if something needs to be updated there?

Hey, I have been using 0.13.0-beta1 for a few days now, and it's working as intended. I'd say the forced default on CancellationToken is not really needed. We need to anyway update all the consumers to implement CancellationToken.

I will push a new commit as soon as I can !

@DFDS-Snyk
Copy link

DFDS-Snyk commented Oct 13, 2025

⚠️ Snyk checks are incomplete.

Status Scanner Critical High Medium Low Total (0)
Code Security 0 0 0 0 0 issues
⚠️ Open Source Security 0 0 0 0 See details
⚠️ Licenses 0 0 0 0 See details

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@toizo toizo merged commit c73ed09 into dfds:master Oct 13, 2025
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants