Skip to content

Archiver Dependencies#3090

Merged
iancooper merged 7 commits into
masterfrom
archiver_dependencies
May 16, 2024
Merged

Archiver Dependencies#3090
iancooper merged 7 commits into
masterfrom
archiver_dependencies

Conversation

@iancooper

@iancooper iancooper commented May 15, 2024

Copy link
Copy Markdown
Member

The archiver has dependencies on Outbox interfaces, and understands how to archive from them. This does not match the Sweeper, where the Sweeper's role is timed calling of methods on the Command Processor to Clear messages. We want to move the archive functionality into the service bus (which deals with our Outboxes from clients) and have the archive sweeper call that.

The Command Processor tests folder is getting pretty busy, so we will deal with that with folders; we will add tests of the archive functionality under there.

@iancooper

Copy link
Copy Markdown
Member Author

I looked at breaking up External Service Bus as part of this as it has grown large. I abandoned that because it became more complex. The External Service Bus manages the interaction of producer and outbox, which are already separate classes. When you try breaking this up into Outbox and Producer components, you realize that you are just creating an abstraction over that inter-relationship, which doesn't gain anything as it is already abstracted into producer and outbox.

So there still does not seem to be a refactoring route that helps here

@iancooper iancooper marked this pull request as draft May 15, 2024 11:16

@preardon preardon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks good to me

@iancooper iancooper marked this pull request as ready for review May 15, 2024 20:09
@iancooper iancooper merged commit b3346eb into master May 16, 2024
@iancooper iancooper deleted the archiver_dependencies branch May 16, 2024 07:14
DevJonny pushed a commit to DevJonny/Brighter that referenced this pull request Feb 28, 2026
* Move archive functionality to external service bus, prevent need for archiver to take a direct Outbox dependency

* Move archiver function to bus; organize CP tests

* Test that external bus archive works as expected

* Add tests around archiving async messages

* Add a test to show we only archive dispatched

* Ensure tests for archiving cover the boundary conditions

* Fix issues with the setup not taking in the new ArchiverProvider dependency for the bus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants