From 39adb941987dc86afae5d57fb115ede2e1d1ebd9 Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Fri, 24 May 2019 14:23:48 -0500 Subject: [PATCH] added v0.4.2 Release notes and IConfirmableMessageEnvelope interface (#56) --- RELEASE_NOTES.md | 6 ++---- .../ConfirmableMessages.cs | 20 +++++++++++++++---- src/common.props | 6 ++---- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 3e1250b..96bb1f2 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,4 +1,2 @@ -#### 0.4.2 May 20 2019 #### -* [Implemented: PersistenceSupervisor: need to add an option for no "make confirmable" function ](https://github.com/petabridge/Akka.Persistence.Extras/issues/47) -* [Implemented: PersistenceSupervisor: accept a Func => Props function similar to what we do for Cluster.Sharding](https://github.com/petabridge/Akka.Persistence.Extras/issues/48) -* `PersistenceSupervisor` now contains overloadable `IConfirmableMessage DoMakeEventConfirmable(object message, long deliveryId)` and `bool CheckIsEvent(object message)` that may be subclassed directly from the `PersistenceSupervisor` base class. \ No newline at end of file +#### 0.4.3 May 24 2019 #### +* Added ` IConfirmableMessageEnvelope` interface to make it easier to work with `ConfirmableMessage` instances in production settings. \ No newline at end of file diff --git a/src/Akka.Persistence.Extras/ConfirmableMessages.cs b/src/Akka.Persistence.Extras/ConfirmableMessages.cs index a40bf7c..06661a7 100644 --- a/src/Akka.Persistence.Extras/ConfirmableMessages.cs +++ b/src/Akka.Persistence.Extras/ConfirmableMessages.cs @@ -29,6 +29,7 @@ public interface IConfirmableMessage string SenderId { get; } } + /// /// A built-in envelope for making user-defined messages /// without changing the types of the messages themselves. @@ -54,13 +55,26 @@ public ConfirmableMessageEnvelope(long confirmationId, string senderId, object m public string SenderId { get; } } + /// + /// Typed "wrapper" interface for exposing confirmable messages that are wrapped inside + /// their confirmation metadata. + /// + /// The type of underlying message. + public interface IConfirmableMessageEnvelope : IConfirmableMessage + { + /// + /// The user-defined message. + /// + TMessage Message { get; } + } + /// /// A built-in envelope for making user-defined messages /// without changing the types of the messages themselves. /// /// Designed to play nicely with typed Receive statements inside actors. /// - public sealed class ConfirmableMessage : IConfirmableMessage + public sealed class ConfirmableMessage : IConfirmableMessageEnvelope { public ConfirmableMessage(TMessage message, long confirmationId, string senderId) { @@ -69,9 +83,7 @@ public ConfirmableMessage(TMessage message, long confirmationId, string senderId SenderId = senderId; } - /// - /// The user-defined message. - /// + /// public TMessage Message { get; } /// diff --git a/src/common.props b/src/common.props index 31079c2..1b0da24 100644 --- a/src/common.props +++ b/src/common.props @@ -2,10 +2,8 @@ Copyright © 2015-2019 Petabridge Petabridge - 0.4.2 - [Implemented: PersistenceSupervisor: need to add an option for no "make confirmable" function ](https://github.com/petabridge/Akka.Persistence.Extras/issues/47) -[Implemented: PersistenceSupervisor: accept a Func<IActorRef> => Props function similar to what we do for Cluster.Sharding](https://github.com/petabridge/Akka.Persistence.Extras/issues/48) -`PersistenceSupervisor` now contains overloadable `IConfirmableMessage DoMakeEventConfirmable(object message, long deliveryId)` and `bool CheckIsEvent(object message)` that may be subclassed directly from the `PersistenceSupervisor` base class. + 0.4.3 + Added ` IConfirmableMessageEnvelope<TMessage>` interface to make it easier to work with `ConfirmableMessage` instances in production settings. https://petabridge.com/images/logo.png https://devops.petabridge.com/articles/msgdelivery/