Skip to content

Commit

Permalink
Added backwards-compatibilty to DistributedPubSubSettings constructor (
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaronontheweb authored Dec 8, 2020
1 parent c8add77 commit 10382bf
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,30 @@ public static DistributedPubSubSettings Create(Config config)
/// <summary>
/// Creates a new instance of the <see cref="DistributedPubSubSettings" />.
/// </summary>
/// <param name="role">TBD</param>
/// <param name="routingLogic">TBD</param>
/// <param name="gossipInterval">TBD</param>
/// <param name="removedTimeToLive">TBD</param>
/// <param name="maxDeltaElements">TBD</param>
/// <param name="role">The role that will host <see cref="DistributedPubSubMediator"/> instances.</param>
/// <param name="routingLogic">Optional. The routing logic used for distributing messages for topic groups.</param>
/// <param name="gossipInterval">The gossip interval for propagating topic/subscriber data to other mediators.</param>
/// <param name="removedTimeToLive">The amount of time it takes to prune a deactivated subscriber from the network.</param>
/// <param name="maxDeltaElements">The maximum number of delta elements that can be propagated in a single gossip tick.</param>
/// <exception cref="ArgumentException">Thrown if a user tries to use a <see cref="ConsistentHashingRoutingLogic"/> with routingLogic.</exception>
[Obsolete("Obsolete - please us the full constructor instead. This constructor only exists for backwards API compatibility.")]
public DistributedPubSubSettings(
string role,
RoutingLogic routingLogic,
TimeSpan gossipInterval,
TimeSpan removedTimeToLive,
int maxDeltaElements) : this(role, routingLogic, gossipInterval, removedTimeToLive, maxDeltaElements, true){ }

/// <summary>
/// Creates a new instance of the <see cref="DistributedPubSubSettings" />.
/// </summary>
/// <param name="role">The role that will host <see cref="DistributedPubSubMediator"/> instances.</param>
/// <param name="routingLogic">Optional. The routing logic used for distributing messages for topic groups.</param>
/// <param name="gossipInterval">The gossip interval for propagating topic/subscriber data to other mediators.</param>
/// <param name="removedTimeToLive">The amount of time it takes to prune a deactivated subscriber from the network.</param>
/// <param name="maxDeltaElements">The maximum number of delta elements that can be propagated in a single gossip tick.</param>
/// <param name="sendToDeadLettersWhenNoSubscribers">When a message is published to a topic with no subscribers send it to the dead letters.</param>
/// <exception cref="ArgumentException">TBD</exception>
/// <exception cref="ArgumentException">Thrown if a user tries to use a <see cref="ConsistentHashingRoutingLogic"/> with routingLogic.</exception>
public DistributedPubSubSettings(
string role,
RoutingLogic routingLogic,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,9 @@ namespace Akka.Cluster.Tools.PublishSubscribe
}
public sealed class DistributedPubSubSettings : Akka.Actor.INoSerializationVerificationNeeded
{
[System.ObsoleteAttribute("Obsolete - please us the full constructor instead. This constructor only exists f" +
"or backwards API compatibility.")]
public DistributedPubSubSettings(string role, Akka.Routing.RoutingLogic routingLogic, System.TimeSpan gossipInterval, System.TimeSpan removedTimeToLive, int maxDeltaElements) { }
public DistributedPubSubSettings(string role, Akka.Routing.RoutingLogic routingLogic, System.TimeSpan gossipInterval, System.TimeSpan removedTimeToLive, int maxDeltaElements, bool sendToDeadLettersWhenNoSubscribers) { }
public System.TimeSpan GossipInterval { get; }
public int MaxDeltaElements { get; }
Expand Down

0 comments on commit 10382bf

Please sign in to comment.