-
Notifications
You must be signed in to change notification settings - Fork 591
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
Add custom filtering and exception handling to topology recovery #1312
Add custom filtering and exception handling to topology recovery #1312
Conversation
1750248
to
580014b
Compare
580014b
to
b71f65d
Compare
Hello, I noticed the Concourse CI build failed after my latest commit (I rebased from main after the model -> channel rename was merged). Could anyone let me know if there's anything on my side I should do to get the build to pass? The build seemed to hang (it took 30 minutes), but if there are failing tests I'll take a look if you can tell me which ones failed. Thanks! |
Hey, thank you for opening this PR. It is in my radar to review after I finish other tasks. The Concourse build has 3 failed tests:
Those tests succeeded in GitHub Actions, so I suspect this may be a flake in Concourse build. I re-triggered the job in Concourse. |
@rosca-sabina the Concourse build is notoriously flaky! |
Ah, I see. Thanks for re-running it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I'll wait for @Zerpet to merge.
Thank you for the code review and approval! One question: After we get @Zerpet 's feedback and this is merged to main, if I provide a backport of this feature to 6.x, would it be possible for it to be released as some sort of patch to 6.4.0, like a 6.4.1? It would really help me out to be able to use this on a project I'm working on, and it would be helpful to know if it would be feasible to have it available sooner, or if I'd have to wait for release 6.5.0 instead. |
@rosca-sabina this change requires the next version to be 6.5.0. If you'd like to open a PR now against 6.x with these changes back-ported, that would be helpful. I don't expect there to be any changes requested to this PR. |
I see, I'll get started on the backport then. Also, I hit the re-review button by mistake, my bad. |
And here is the backport to 6.x: #1316. Just to make sure I understand correctly: when you say this change requires the version to be 6.5.0, do you mean that the minor version, and not the patch, needs to be incremented to respect semantic versioning? Or did you mean that this feature would have to be released as part of milestone 6.5.0, together with all of the other fixes/features that the milestone currently includes? |
Yes to that.
That would be nice, too. There are two issues I want to fix before releasing 6.5.0. I'll probably have time this week to start looking at them. |
@lukebakken I see, thanks for the clarification! @Zerpet I just noticed my accidentally clicking re-review removed you as a reviewer. That was my bad, didn't mean to click it. Please feel free to leave your feedback when you can. |
@lukebakken since the backport #1316 is for The idea is to track this enhancement in the release notes, when we decide to ship 7.0. |
@Zerpet good catch |
Fixes #658
Proposed Changes
This PR introduces changes that address issue #658. The changes I made are based on @acogoluegnes's suggestion of adapting the features related to topology recovery included in the Java client.
For topology recovery filtering, I added class
TopologyRecoveryFilter
, which is initialized at theConnectionFactory
level. It allows users to specify filters for each type of recorded entity (exchanges, queues, bindings, consumers). During topology recovery, the recorded entities will or won't be recovered based on whether they match the condition specified in theTopologyRecoveryFilter
or not. If no filter is specified for an entity type, all entities of that type will be recovered.For exception handling, I added class
TopologyRecoveryExceptionHandler
, which is also initialized at theConnectionFactory
level. For each type of recorded entity, it allows users to provide: a custom exception handler, which defines what action is taken in the case of an exception, and a condition, which determines what exceptions the custom exception handler applies to. If no custom exception handler is specified for an entity type, the default exception handling behavior (defined inHandleTopologyRecoveryException()
) is used for all exceptions.Types of Changes
What types of changes does your code introduce to this project?
Checklist
CONTRIBUTING.md
document