Skip to content

Commit

Permalink
feat: add rename streetname producers
Browse files Browse the repository at this point in the history
  • Loading branch information
emalfroy authored and ArneD committed Nov 28, 2023
1 parent a984ac8 commit f4e92eb
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 22 deletions.
18 changes: 9 additions & 9 deletions paket.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,15 @@ nuget Be.Vlaanderen.Basisregisters.DataDog.Tracing.SqlStreamStore 5.0.3

nuget Be.Vlaanderen.Basisregisters.Crab 3.0.0

nuget Be.Vlaanderen.Basisregisters.GrAr.Common 19.0.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Contracts 19.0.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Edit 19.0.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Import 19.0.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Legacy 19.0.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Oslo 19.0.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Provenance 19.0.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Provenance.AcmIdm 19.0.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Extracts 19.0.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Common 20.6.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Contracts 20.6.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Edit 20.6.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Import 20.6.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Legacy 20.6.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Oslo 20.6.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Provenance 20.6.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Provenance.AcmIdm 20.6.0
nuget Be.Vlaanderen.Basisregisters.GrAr.Extracts 20.6.0

nuget Be.Vlaanderen.Basisregisters.MessageHandling.AwsSqs.Simple 4.8.3
nuget Be.Vlaanderen.Basisregisters.MessageHandling.Kafka.Consumer 4.8.3
Expand Down
29 changes: 16 additions & 13 deletions paket.lock
Original file line number Diff line number Diff line change
Expand Up @@ -281,18 +281,20 @@ NUGET
Autofac.Extensions.DependencyInjection (>= 7.2) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.EventHandling (4.2.3) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.Generators.Guid.Deterministic (3.0.1) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.GrAr.Common (19.0)
Be.Vlaanderen.Basisregisters.GrAr.Common (20.6)
Be.Vlaanderen.Basisregisters.AggregateSource (>= 8.0) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.CommandHandling (>= 8.0) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
NetTopologySuite (>= 2.4) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
NodaTime (>= 3.0.10) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.GrAr.Contracts (19.0)
Be.Vlaanderen.Basisregisters.GrAr.Contracts (20.6)
Be.Vlaanderen.Basisregisters.AggregateSource (>= 8.0) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
NodaTime (>= 3.0.10) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.GrAr.Edit (19.0)
Be.Vlaanderen.Basisregisters.GrAr.Edit (20.6)
NetTopologySuite (>= 2.4) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.GrAr.Extracts (19.0)
Be.Vlaanderen.Basisregisters.GrAr.Extracts (20.6)
Be.Vlaanderen.Basisregisters.Api (>= 20.0) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.Shaperon (>= 9.0.1) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.GrAr.Import (19.0)
Be.Vlaanderen.Basisregisters.GrAr.Import (20.6)
Autofac (>= 6.3) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.AggregateSource.SqlStreamStore (>= 8.0) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.CommandHandling (>= 8.0) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Expand All @@ -308,27 +310,28 @@ NUGET
Serilog.Extensions.Logging (>= 3.1) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Serilog.Sinks.Email (>= 2.4) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
System.Threading.Tasks.Dataflow (>= 6.0) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.GrAr.Legacy (19.0)
Be.Vlaanderen.Basisregisters.GrAr.Legacy (20.6)
Be.Vlaanderen.Basisregisters.GrAr.Common (20.6) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.Utilities.Rfc3339DateTimeOffset (>= 3.0) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Newtonsoft.Json (>= 13.0.1) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.GrAr.Oslo (19.0)
Be.Vlaanderen.Basisregisters.GrAr.Oslo (20.6)
Be.Vlaanderen.Basisregisters.AspNetCore.Mvc.Formatters.Json (>= 4.0) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.GrAr.Common (19.0) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.GrAr.Common (20.6) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.Utilities.Rfc3339DateTimeOffset (>= 3.0) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Microsoft.Extensions.Configuration (>= 6.0.1) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Microsoft.Extensions.Http.Polly (>= 6.0.3) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Newtonsoft.Json (>= 13.0.1) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.GrAr.Provenance (19.0)
Be.Vlaanderen.Basisregisters.GrAr.Provenance (20.6)
Be.Vlaanderen.Basisregisters.CommandHandling (>= 8.0) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.Crab (>= 3.0) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.GrAr.Common (19.0) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.GrAr.Common (20.6) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Microsoft.CSharp (>= 4.7) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.GrAr.Provenance.AcmIdm (19.0)
Be.Vlaanderen.Basisregisters.GrAr.Provenance.AcmIdm (20.6)
Be.Vlaanderen.Basisregisters.Auth.AcmIdm (>= 1.4) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.CommandHandling (>= 8.0) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.Crab (>= 3.0) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.GrAr.Common (19.0) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.GrAr.Provenance (19.0) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.GrAr.Common (20.6) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.GrAr.Provenance (20.6) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Microsoft.CSharp (>= 4.7) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Be.Vlaanderen.Basisregisters.MessageHandling.AwsSqs.Simple (4.8.3)
AWSSDK.Core (>= 3.7.106.8) - restriction: || (&& (== net472) (>= net6.0)) (== net6.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ public static Contracts.StreetNameWasCorrectedFromRejectedToProposed ToContract(
public static Contracts.StreetNameWasRetiredV2 ToContract(this StreetNameWasRetiredV2 message) =>
new Contracts.StreetNameWasRetiredV2(message.MunicipalityId.ToString("D"), message.PersistentLocalId, message.Provenance.ToContract());

public static Contracts.StreetNameWasRenamed ToContract(this StreetNameWasRenamed message) =>
new Contracts.StreetNameWasRenamed(message.MunicipalityId.ToString("D"), message.PersistentLocalId, message.DestinationPersistentLocalId, message.Provenance.ToContract());

public static Contracts.StreetNameWasCorrectedFromRetiredToCurrent ToContract(this StreetNameWasCorrectedFromRetiredToCurrent message) =>
new Contracts.StreetNameWasCorrectedFromRetiredToCurrent(message.MunicipalityId.ToString("D"), message.PersistentLocalId, message.Provenance.ToContract());

Expand Down
7 changes: 7 additions & 0 deletions src/StreetNameRegistry.Producer/ProducerMigrateProjections.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@ await Produce(message.Message.PersistentLocalId, message.Message.ToContract(), m
ct);
});

When<Be.Vlaanderen.Basisregisters.ProjectionHandling.SqlStreamStore.Envelope<
MunicipalityDomain.StreetNameWasRenamed>>(async (_, message, ct) =>
{
await Produce(message.Message.PersistentLocalId, message.Message.ToContract(), message.Position,
ct);
});

When<Be.Vlaanderen.Basisregisters.ProjectionHandling.SqlStreamStore.Envelope<
MunicipalityDomain.StreetNameWasCorrectedFromRetiredToCurrent>>(async (_, message, ct) =>
{
Expand Down
5 changes: 5 additions & 0 deletions src/StreetNameRegistry.Producer/ProducerProjections.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,11 @@ public ProducerProjections(IProducer producer)
await Produce(message.Message.PersistentLocalId, message.Message.ToContract(), message.Position, ct);
});

When<Be.Vlaanderen.Basisregisters.ProjectionHandling.SqlStreamStore.Envelope<MunicipalityDomain.StreetNameWasRenamed>>(async (_, message, ct) =>
{
await Produce(message.Message.PersistentLocalId, message.Message.ToContract(), message.Position, ct);
});

When<Be.Vlaanderen.Basisregisters.ProjectionHandling.SqlStreamStore.Envelope<MunicipalityDomain.StreetNameWasCorrectedFromRetiredToCurrent>>(async (_, message, ct) =>
{
await Produce(message.Message.PersistentLocalId, message.Message.ToContract(), message.Position, ct);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace StreetNameRegistry.Projections.Legacy.StreetNameName
using StreetName;
using StreetName.Events;
using StreetName.Events.Crab;
using RegionFilter = Be.Vlaanderen.Basisregisters.GrAr.Common.RegionFilter;

[ConnectedProjectionName("API endpoint straatnamen ifv BOSA DT")]
[ConnectedProjectionDescription("Projectie die de straatnamen data voor straatnamen ifv BOSA DT voorziet.")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace StreetNameRegistry.Projections.Legacy.StreetNameNameV2
using Municipality.Events;
using NodaTime;
using StreetName.Events;
using RegionFilter = Be.Vlaanderen.Basisregisters.GrAr.Common.RegionFilter;

[ConnectedProjectionName("API endpoint straatnamen ifv BOSA DT")]
[ConnectedProjectionDescription("Projectie die de straatnamen data voor straatnamen ifv BOSA DT voorziet.")]
Expand Down

0 comments on commit f4e92eb

Please sign in to comment.