Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@ To use events, first install the [NuGet package](https://www.nuget.org/packages/
dotnet add package Luxoft.Bss.Platform.Events
```

> [!NOTE]
> For the new integration-events registration (`AddPlatformIntegrationEvents` overloads, input/output events,
> failed event processing, breaking changes and the queue-name `.v1` switch) see the
> [package README](src/Bss.Platform.Events/README.md).

### Domain Events

To use domain events, you need register it in DI
Expand Down
14 changes: 14 additions & 0 deletions src/Bss.Platform.Events.Abstractions/IEventTypeProvider.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace Bss.Platform.Events.Abstractions;

public interface IEventTypeProvider
{
/// <summary>
/// Internal events are sent to the Rabbit->CAP queue and handled within the target system
/// </summary>
IReadOnlyDictionary<Type, string> InputEvents { get; }

/// <summary>
/// External events are sent to the Rabbit exchange, but do not have a handler in the target system
/// </summary>
IReadOnlyDictionary<Type, string> OutputEvents { get; }
}
6 changes: 6 additions & 0 deletions src/Bss.Platform.Events.Abstractions/IFailedEventProcessor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Bss.Platform.Events.Abstractions;

public interface IFailedEventProcessor<in TInputEvent>
{
Task HandleAsync(TInputEvent? value, Exception ex, string? rawMessageBody);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
namespace Bss.Platform.Events.Abstractions;

public interface IIntegrationEventPublisher
public interface IIntegrationEventPublisher<in T>
{
Task PublishAsync(IIntegrationEvent @event, CancellationToken cancellationToken);
Task PublishAsync(T @event, CancellationToken cancellationToken);
}

public interface IIntegrationEventPublisher : IIntegrationEventPublisher<IIntegrationEvent>;
3 changes: 3 additions & 0 deletions src/Bss.Platform.Events/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("Tests.Unit")]
2 changes: 2 additions & 0 deletions src/Bss.Platform.Events/Bss.Platform.Events.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@
<ItemGroup>
<ProjectReference Include="..\Bss.Platform.Events.Abstractions\Bss.Platform.Events.Abstractions.csproj"/>
<ProjectReference Include="..\Bss.Platform.Mediation.Abstractions\Bss.Platform.Mediation.Abstractions.csproj"/>
<ProjectReference Include="..\Bss.Platform.RabbitMq.JsonSchemaGeneratorBase\Bss.Platform.RabbitMq.JsonSchemaGeneratorBase.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="DotNetCore.CAP.Dashboard"/>
<PackageReference Include="DotNetCore.CAP.RabbitMQ"/>
<PackageReference Include="DotNetCore.CAP.SqlServer"/>
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions"/>
<PackageReference Include="Savorboard.CAP.InMemoryMessageQueue"/>
</ItemGroup>
</Project>
53 changes: 0 additions & 53 deletions src/Bss.Platform.Events/CapConsumerServiceSelector.cs

This file was deleted.

Loading
Loading