Outbox requires transport to be running in ReceiveOnly mode. Use the TransportTransactionMode property on the transport definition to specify the transaction mode.
We saw the known limitation regarding AdvancedConfiguration.UseTransport(..), and instead use the .Transport property.
The added code compared to the downloaded example code is:
.UseNServiceBus((configuration, endpointConfiguration) =>
{
var persistence = endpointConfiguration.AdvancedConfiguration.UsePersistence<SqlPersistence>();
persistence.SqlDialect<SqlDialect.MsSqlServer>();
persistence.ConnectionBuilder(() => new SqlConnection("<connection string>"));
persistence.TablePrefix("_NSB_");
endpointConfiguration.Transport.TransportTransactionMode = TransportTransactionMode.ReceiveOnly;
endpointConfiguration.AdvancedConfiguration.EnableOutbox();
})
And except for the packages provided with the example, the follwing are added:
When we omit those two lines, and we shutdown our database before sending out the FollowupMessage() in the TriggerMessageHandler, then it fails because as we understood, it tries to write to the outbox in database. Is this assumption correct?
We just checked, and even though have have set NServiceBus.AzureFunctions.Worker.ServiceBus to 4.* we get 4.1.0. It seems that * respects our wish to get the highest stable version.
So we have the issue with 4.1.0. We’ve tested it on two machines (Mac + Windows).