Skip to content

Commit

Permalink
added v0.4.2 Release notes and IConfirmableMessageEnvelope<T> interfa…
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaronontheweb authored May 24, 2019
1 parent c313bdf commit 39adb94
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
6 changes: 2 additions & 4 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -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<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 May 24 2019 ####
* Added ` IConfirmableMessageEnvelope<TMessage>` interface to make it easier to work with `ConfirmableMessage` instances in production settings.
20 changes: 16 additions & 4 deletions src/Akka.Persistence.Extras/ConfirmableMessages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public interface IConfirmableMessage
string SenderId { get; }
}


/// <summary>
/// A built-in envelope for making user-defined messages <see cref="IConfirmableMessage" />
/// without changing the types of the messages themselves.
Expand All @@ -54,13 +55,26 @@ public ConfirmableMessageEnvelope(long confirmationId, string senderId, object m
public string SenderId { get; }
}

/// <summary>
/// Typed "wrapper" interface for exposing confirmable messages that are wrapped inside
/// their confirmation metadata.
/// </summary>
/// <typeparam name="TMessage">The type of underlying message.</typeparam>
public interface IConfirmableMessageEnvelope<out TMessage> : IConfirmableMessage
{
/// <summary>
/// The user-defined message.
/// </summary>
TMessage Message { get; }
}

/// <summary>
/// A built-in envelope for making user-defined messages <see cref="IConfirmableMessage" />
/// without changing the types of the messages themselves.
///
/// Designed to play nicely with typed Receive statements inside actors.
/// </summary>
public sealed class ConfirmableMessage<TMessage> : IConfirmableMessage
public sealed class ConfirmableMessage<TMessage> : IConfirmableMessageEnvelope<TMessage>
{
public ConfirmableMessage(TMessage message, long confirmationId, string senderId)
{
Expand All @@ -69,9 +83,7 @@ public ConfirmableMessage(TMessage message, long confirmationId, string senderId
SenderId = senderId;
}

/// <summary>
/// The user-defined message.
/// </summary>
/// <inheritdoc />
public TMessage Message { get; }

/// <inheritdoc />
Expand Down
6 changes: 2 additions & 4 deletions src/common.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
<PropertyGroup>
<Copyright>Copyright © 2015-2019 Petabridge</Copyright>
<Authors>Petabridge</Authors>
<VersionPrefix>0.4.2</VersionPrefix>
<PackageReleaseNotes>[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&lt;IActorRef&gt; =&gt; 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.</PackageReleaseNotes>
<VersionPrefix>0.4.3</VersionPrefix>
<PackageReleaseNotes>Added ` IConfirmableMessageEnvelope&lt;TMessage&gt;` interface to make it easier to work with `ConfirmableMessage` instances in production settings.</PackageReleaseNotes>
<PackageIconUrl>https://petabridge.com/images/logo.png</PackageIconUrl>
<PackageProjectUrl>
https://devops.petabridge.com/articles/msgdelivery/
Expand Down

0 comments on commit 39adb94

Please sign in to comment.