-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
23 lines (17 loc) · 797 Bytes
/
Program.cs
File metadata and controls
23 lines (17 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using JasperFx;
using Wolverine;
using Wolverine.Postgresql;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddWolverine(opts =>
{
opts.Policies.UseDurableLocalQueues();
opts.Durability.KeepAfterMessageHandling = TimeSpan.FromHours(1);
opts.LocalQueue("q1").UseDurableInbox();
var pgsqlPersistance = opts.PersistMessagesWithPostgresql(builder.Configuration.GetConnectionString("SolidDB")!);
});
builder.Services.AddLogging();
var app = builder.Build();
app.MapPost("/oh/ping", (IMessageBus bus) => bus.PublishAsync(new Solid.OperationHandler.Ping(Guid.CreateVersion7())));
app.MapPost("/trader/ping", (IMessageBus bus) => bus.PublishAsync(new Solid.OperationHandler.Ping(Guid.CreateVersion7())));
// app.Run();
return await app.RunJasperFxCommands(args);