The message persistence requires and adds these tables to your schema:
jasper_incoming_envelopes
- stores incoming and scheduled envelopes until they are successfully processedjasper_outgoing_envelopes
- stores outgoing envelopes until they are successfully sent through the transportsjasper_dead_letters
- stores "dead letter" envelopes that could not be processed. See Dead Letter Envelopes for more informationEnvelopeIdList
- table type that is used by some of the functions listed below
and also these functions that are all used by the durable messaging in its "message recovery" functionality:
uspDeleteIncomingEnvelopes
uspDeleteOutgoingEnvelopes
uspDiscardAndReassignOutgoing
uspMarkIncomingOwnership
uspMarkOutgoingOwnership
Managing the Sql Server Schema
In testing, you can build -- or rebuild -- the message storage in your system with a call to the RebuildMessageStorage()
extension method off of either IWebHost
or IJasperHost
as shown below in a sample taken from xUnit integration testing with Jasper:
public class MyJasperAppFixture : IDisposable
{
public MyJasperAppFixture()
{
Host = JasperHost.For<MyJasperApp>();
// This extension method will blow away any existing
// schema items for message persistence in your configured
// database and then rebuilds the message persistence objects
// before the *first* integration test runs
Host.RebuildMessageStorage();
}
public IJasperHost Host { get; }
public void Dispose()
{
Host?.Dispose();
}
}
// An xUnit test fixture that uses our MyJasperAppFixture
public class IntegrationTester : IClassFixture<MyJasperAppFixture>
{
private readonly MyJasperAppFixture _fixture;
public IntegrationTester(MyJasperAppFixture fixture)
{
_fixture = fixture;
}
}
See this GitHub issue for some utilities to better manage the database objects.