-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve e2e integration tests and isolate tests from other things; in…
…cludes patch to Serializer (#5497) * integration tests used to use the samples - now they are separate * patch dictionary problem in serializer * add Message Registry with dead letter queue that gets checked on new subs.
- Loading branch information
Showing
40 changed files
with
1,420 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
dotnet/src/Microsoft.AutoGen/RuntimeGateway.Grpc/Abstractions/IMessageRegistryGrain.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// IMessageRegistryGrain.cs | ||
|
||
using Microsoft.AutoGen.Contracts; | ||
|
||
namespace Microsoft.AutoGen.RuntimeGateway.Grpc.Abstractions; | ||
|
||
public interface IMessageRegistryGrain : IGrainWithIntegerKey | ||
{ | ||
/// <summary> | ||
/// Writes a message to the dead-letter queue for the given topic. | ||
/// </summary> | ||
Task WriteMessageAsync(string topic, CloudEvent message); | ||
|
||
/// <summary> | ||
/// Removes all messages for the given topic from the dead-letter queue. | ||
/// </summary> | ||
/// <param name="topic">The topic to remove messages for.</param> | ||
/// <returns>A task representing the asynchronous operation, with the list of removed messages as the result.</returns> | ||
Task<List<CloudEvent>> RemoveMessagesAsync(string topic); | ||
} | ||
|
18 changes: 18 additions & 0 deletions
18
dotnet/src/Microsoft.AutoGen/RuntimeGateway.Grpc/Abstractions/MessageRegistryState.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// MessageRegistryState.cs | ||
|
||
using System.Collections.Concurrent; | ||
using Microsoft.AutoGen.Contracts; | ||
|
||
namespace Microsoft.AutoGen.RuntimeGateway.Grpc.Abstractions; | ||
|
||
/// <summary> | ||
/// Holds a dead-letter queue by topic type. | ||
/// </summary> | ||
public class MessageRegistryState | ||
{ | ||
/// <summary> | ||
/// Dictionary mapping topic types to a list of CloudEvents that failed delivery. | ||
/// </summary> | ||
public ConcurrentDictionary<string, List<CloudEvent>> DeadLetterQueue { get; set; } = new(); | ||
} |
Oops, something went wrong.