diff --git a/Directory.Build.props b/Directory.Build.props
index c6b50a5a3..b6bd566ec 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -11,7 +11,7 @@
net6.0;net7.0
1570;1571;1572;1573;1574;1587;1591;1701;1702;1711;1735;0618
true
- 1.8.2
+ 1.8.3
$(PackageProjectUrl)
true
true
diff --git a/src/Persistence/Wolverine.RDBMS/MessageDatabase.Incoming.cs b/src/Persistence/Wolverine.RDBMS/MessageDatabase.Incoming.cs
index ff1cbbb15..274596f05 100644
--- a/src/Persistence/Wolverine.RDBMS/MessageDatabase.Incoming.cs
+++ b/src/Persistence/Wolverine.RDBMS/MessageDatabase.Incoming.cs
@@ -2,6 +2,7 @@
using Weasel.Core;
using Wolverine.Persistence.Durability;
using Wolverine.Runtime.Serialization;
+using Wolverine.Transports;
namespace Wolverine.RDBMS;
@@ -70,6 +71,12 @@ public Task IncrementIncomingEnvelopeAttemptsAsync(Envelope envelope)
public async Task StoreIncomingAsync(Envelope envelope)
{
+ if (envelope.OwnerId == TransportConstants.AnyNode && envelope.Status == EnvelopeStatus.Incoming)
+ {
+ throw new ArgumentOutOfRangeException(nameof(Envelope),
+ "Erroneous persistence of an incoming envelope to 'any' node");
+ }
+
var builder = ToCommandBuilder();
DatabasePersistence.BuildIncomingStorageCommand(this, builder, envelope);
diff --git a/src/Wolverine/Runtime/Routing/MessageRoute.cs b/src/Wolverine/Runtime/Routing/MessageRoute.cs
index b22165dfa..70b84e6ef 100644
--- a/src/Wolverine/Runtime/Routing/MessageRoute.cs
+++ b/src/Wolverine/Runtime/Routing/MessageRoute.cs
@@ -82,6 +82,10 @@ public Envelope CreateForSending(object message, DeliveryOptions? options, ISend
return envelope.ForScheduledSend(localDurableQueue);
}
}
+ else
+ {
+ envelope.OwnerId = runtime.Options.Durability.AssignedNodeNumber;
+ }
return envelope;
}