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

Add Infinity.Toolkit.Messaging #4

Merged
merged 6 commits into from
Jan 14, 2025
Merged

Add Infinity.Toolkit.Messaging #4

merged 6 commits into from
Jan 14, 2025

Conversation

penyland
Copy link
Owner

PR Classification

New package for messaging capabilities in the toolkit.

PR Summary

This pull request introduces a new messaging framework within the Infinity Toolkit, including in-memory messaging support and related configurations. Key changes include:

  • Infinity.Toolkit.sln: Added new projects for Infinity.Toolkit.Messaging and MessagingSample.
  • MessagingSample.csproj: Created with .NET 9.0 SDK and necessary package references.
  • Program.cs: Modified to set up messaging services and define message handlers for weather forecasts.
  • InMemoryBus.cs: Implemented in-memory messaging functionality, including producers and consumers.
  • Unit tests: Created and updated to ensure the functionality of the new messaging system.

Replaced `xunit.abstractions` with `xunit.v3` in the project file to leverage new features and improve compatibility. Updated import statements in `XunitLogger`, `XunitLoggerFactory`, `XunitLoggerProvider`, and `XunitLoggerProviderExtensions` to simplify dependencies and align with the new xUnit structure. This transition enhances logging capabilities within the `Infinity.Toolkit.TestUtils` namespace.
Updated `Infinity.Toolkit.Tests.csproj` to include new package references and project references. Added multiple test classes for `EnvelopeBuilder`, `InMemoryBus`, `InMemoryChannelProcessor`, `InMemoryChannelProducer`, and `InMemoryChannelReceiver`, ensuring comprehensive coverage of message processing and exception handling. Introduced utility classes like `MessagingTestHelpers` and `ObservedMessageContexts` to streamline testing. Enhanced `TestBase` for better service provider configuration and added a `TestBroker` for simulating messaging behavior. Updated global using directives for cleaner code.
This commit introduces two new projects to the solution:
"Infinity.Toolkit.Messaging" located in "src\Infinity.Toolkit.Messaging"
and "MessagingSample" in "samples\MessagingSample".
Build configurations for both Debug and Release modes have been
added to the solution settings.
Renamed `IMessagingBroker` to `IBroker` and updated all related interfaces and classes accordingly. Removed the `ChannelRegistration` class and integrated its properties elsewhere. Updated documentation in `ClientDiagnostics` for clarity. Renamed `MessageBusMetrics` to `Metrics` and adjusted all references. Modified `InMemoryBus`, `InMemoryBusBuilder`, and other related classes to implement the new structure. Updated tests to reflect these changes and added global using directives for `Xunit`. Cleaned up unused using directives across various files.
@penyland penyland merged commit 93c0970 into main Jan 14, 2025
1 of 2 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.

1 participant