Sweeper deployed on its own - had to create some Dummy classes in the Publisher #2059
IlSocio
started this conversation in
Show and tell
Replies: 1 comment 6 replies
-
I run the Sweeper as its own thing, so the thing to not is that it looks for a specific publisher or uses the default (i.e. you have to have 1) My runs as follows var producerRegistry = new AzureServiceBusProducerRegistryFactory(serviceBusClientProvider,
new AzureServiceBusPublication[]
{
new() {MakeChannels = OnMissingChannel.Validate, Topic = new RoutingKey("default")}
}, boxSettings.BatchChunkSize).Create();
builder.Services.AddBrighter()
.UseExternalBus(producerRegistry)
.UseMsSqlOutbox(outboxSettings, outboxType)
.UseOutboxSweeper(options =>
{
options.TimerInterval = boxSettings.OutboxSweeperInterval;
options.MinimumMessageAge = boxSettings.MinimumMessageAge;
options.BatchSize = boxSettings.BatchSize;
options.UseBulk = boxSettings.UseBulk;
});
) I hope this helps |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to totally delegate to the Sweeper the push of the messages to the servicebus.
The publisher component will only insert messages to the outbox table.
So, ideally, the publisher should only contain the configuration to access the database.
To support this scenario, I've been forced to create the two dummy classes below... for the Publisher.
and I'm wondering if there exists a cleaner way to do it.
I use them in the Publisher as below:
Some relevant part of the code, which forced me to create the DummyProducer class
Brighter/src/Paramore.Brighter/ExternalBusServices.cs
Line 90 in 2efd443
Beta Was this translation helpful? Give feedback.
All reactions