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 @@ -81,6 +81,12 @@ public async Task rabbitmq_transport_is_exposed_as_a_resource()
[Fact]
public async Task find_endpoints_through_conventions_as_part_of_find_resources()
{
if (DateTimeOffset.UtcNow > new DateTime(2025, 12, 25))
{
// Uncomment code in WolverineSystemPart
throw new Exception("Jeremy, you need to go try to fix this again!");
}

using var host = Host.CreateDefaultBuilder()
.UseWolverine(opts =>
{
Expand Down
2 changes: 1 addition & 1 deletion src/Wolverine/Runtime/Routing/MessageRoute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public Envelope CreateForSending(object message, DeliveryOptions? options, ISend
var envelope = new Envelope(message, Sender)
{
Serializer = Serializer,
ContentType = Serializer.ContentType,
ContentType = Serializer?.ContentType,
TopicName = topicName
};

Expand Down
18 changes: 10 additions & 8 deletions src/Wolverine/WolverineSystemPart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -211,15 +211,17 @@ public override async ValueTask<IReadOnlyList<IStatefulResource>> FindResources(
}
}

// TODO -- this did not work. Try again by the end of 2025

// Force Wolverine to find all message types...
var messageTypes = _runtime.Options.Discovery.FindAllMessages(_runtime.Options.HandlerGraph);

// ...and force Wolverine to *also* execute the routing, which
// may discover new endpoints
foreach (var messageType in messageTypes.Where(x => x.Assembly != GetType().Assembly))
{
_runtime.RoutingFor(messageType);
}
// var messageTypes = _runtime.Options.Discovery.FindAllMessages(_runtime.Options.HandlerGraph);
//
// // ...and force Wolverine to *also* execute the routing, which
// // may discover new endpoints
// foreach (var messageType in messageTypes.Where(x => x.Assembly != GetType().Assembly))
// {
// _runtime.RoutingFor(messageType);
// }
}

var stores = await _runtime.Stores.FindAllAsync();
Expand Down
Loading