Publishing
Configuring Wolverine subscriptions through GCP Pub/Sub topics is done with the ToPubsubTopic()
extension method shown in the example below:
cs
var host = await Host.CreateDefaultBuilder()
.UseWolverine(opts =>
{
opts.UsePubsub("your-project-id");
opts
.PublishMessage<Message1>()
.ToPubsubTopic("outbound1");
opts
.PublishMessage<Message2>()
.ToPubsubTopic("outbound2")
.ConfigurePubsubTopic(options =>
{
options.MessageRetentionDuration =
Duration.FromTimeSpan(TimeSpan.FromMinutes(10));
});
}).StartAsync();