Skip to content

Commit

Permalink
use serializer from configuration object
Browse files Browse the repository at this point in the history
  • Loading branch information
Viktor Hartenberger committed May 13, 2024
1 parent 9808f72 commit 2f50b46
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<PackageIconUrl>https://raw.githubusercontent.com/BookBeat/knightbus/master/documentation/media/images/knighbus-64.png</PackageIconUrl>
<PackageIcon>knighbus-64.png</PackageIcon>
<RepositoryUrl>https://github.com/BookBeat/knightbus</RepositoryUrl>
<Version>1.1.2</Version>
<Version>1.1.3</Version>
<PackageTags>knightbus;postgresql;queues;messaging</PackageTags>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ public class PostgresQueueManager : IQueueManager
private readonly PostgresManagementClient _managementClient;
private readonly IMessageSerializer _messageSerializer;

public PostgresQueueManager(PostgresManagementClient managementClient, IMessageSerializer messageSerializer)
public PostgresQueueManager(PostgresManagementClient managementClient, IPostgresConfiguration configuration)
{
_managementClient = managementClient;
_messageSerializer = messageSerializer;
_messageSerializer = configuration.MessageSerializer;
}

public async Task<IEnumerable<QueueProperties>> List(CancellationToken ct)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public override async Task Setup()
_postgresManagementClient = new PostgresManagementClient(PostgresTestBase.TestNpgsqlDataSource,
new PostgresConfiguration { MessageSerializer = new MicrosoftJsonSerializer() });
_postgresQueueClient = new PostgresQueueClient<PostgresTestCommand>(PostgresTestBase.TestNpgsqlDataSource, new MicrosoftJsonSerializer());
QueueManager = new PostgresQueueManager(_postgresManagementClient, new MicrosoftJsonSerializer());
QueueManager = new PostgresQueueManager(_postgresManagementClient,
new PostgresConfiguration { MessageSerializer = new MicrosoftJsonSerializer() });
QueueType = QueueType.Queue;
_bus = new PostgresBus(PostgresTestBase.TestNpgsqlDataSource,
new PostgresConfiguration { MessageSerializer = new MicrosoftJsonSerializer() });
Expand Down

0 comments on commit 2f50b46

Please sign in to comment.