Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ internal bool TryMatch(Type messageType, IWolverineRuntime runtime, out IMessage
{
var innerRoutes = _slots.Select(x => new MessageRoute(messageType, x, runtime)).ToArray();

// TODO -- do we let you configure grouping here too????
route = new ShardedMessageRoute(Uri, runtime.Options.MessagePartitioning, innerRoutes);

return true;
}

Expand Down
6 changes: 3 additions & 3 deletions src/Wolverine/Runtime/Partitioning/ShardedMessageRoute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ public Envelope CreateForSending(object message, DeliveryOptions? options, ISend

public MessageSubscriptionDescriptor Describe()
{
// TODO -- there's more to do here!
return new MessageSubscriptionDescriptor
{
Description = "Sharded",
Endpoint = _uri
Description = "Partitioned",
Endpoint = _uri,
Partitions = _slots.Select(x => x.Describe()).ToArray()
};
}
}
3 changes: 2 additions & 1 deletion src/Wolverine/Runtime/Routing/IMessageRoute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ Envelope CreateForSending(object message, DeliveryOptions? options, ISendingAgen
/// </summary>
public class MessageSubscriptionDescriptor
{
public Uri Endpoint { get; init; } = new Uri("null://null");
public Uri Endpoint { get; init; } = new("null://null");
public string ContentType { get; set; } = "application/json";
public string Description { get; set; } = string.Empty;
public MessageSubscriptionDescriptor[] Partitions { get; set; } = [];

public override string ToString()
{
Expand Down
Loading