Skip to content

Commit

Permalink
renamed variable
Browse files Browse the repository at this point in the history
  • Loading branch information
lsfera committed Jun 26, 2024
1 parent 51eb9f8 commit 0410268
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Blumchen/Subscriptions/Subscription.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public async IAsyncEnumerable<IEnvelope> Subscribe(
)
{
_options = builder(Builder).Build();
var (connectionString, publicationSetupOptions, slotSetupOptions, errorProcessor, replicationDataMapper, registry) = _options;
var (connectionString, publicationSetupOptions, replicationSlotSetupOptions, errorProcessor, replicationDataMapper, registry) = _options;
var dataSourceBuilder = new NpgsqlDataSourceBuilder(connectionString);
dataSourceBuilder.UseLoggerFactory(loggerFactory);

Expand All @@ -48,19 +48,19 @@ public async IAsyncEnumerable<IEnvelope> Subscribe(


await dataSource.SetupPublication(publicationSetupOptions, ct).ConfigureAwait(false);
var result = await dataSource.SetupReplicationSlot(_connection, slotSetupOptions, ct).ConfigureAwait(false);
var result = await dataSource.SetupReplicationSlot(_connection, replicationSlotSetupOptions, ct).ConfigureAwait(false);

PgOutputReplicationSlot slot;

if (result is not Created created)
{
slot = new PgOutputReplicationSlot(slotSetupOptions.SlotName);
slot = new PgOutputReplicationSlot(replicationSlotSetupOptions.SlotName);
}
else
{
slot = new PgOutputReplicationSlot(
new ReplicationSlotOptions(
slotSetupOptions.SlotName,
replicationSlotSetupOptions.SlotName,
created.LogSequenceNumber
)
);
Expand All @@ -72,7 +72,7 @@ public async IAsyncEnumerable<IEnvelope> Subscribe(

await foreach (var message in
_connection.StartReplication(slot,
new PgOutputReplicationOptions(publicationSetupOptions.PublicationName, 1, slotSetupOptions.Binary), ct).ConfigureAwait(false))
new PgOutputReplicationOptions(publicationSetupOptions.PublicationName, 1, replicationSlotSetupOptions.Binary), ct).ConfigureAwait(false))
{
if (message is InsertMessage insertMessage)
{
Expand Down

0 comments on commit 0410268

Please sign in to comment.