Skip to content

Commit 1b75c19

Browse files
authored
Merge pull request #5 from cajuncoding/feature/add_global_outbox_initializer_for_configuration
Fix bug in DefaultSqlServerOutboxRepository to use new customizable g…
2 parents dde5758 + 96eb0a9 commit 1b75c19

File tree

9 files changed

+35
-15
lines changed

9 files changed

+35
-15
lines changed

SqlTransactionalOutbox.AzureServiceBus/SqlTransactionalOutbox.AzureServiceBus.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
55
<RootNamespace>SqlTransactionalOutbox.AzureServiceBus</RootNamespace>
6-
<Version>1.0.1</Version>
6+
<Version>1.0.2</Version>
77
<Authors>BBernard / CajunCoding</Authors>
88
<Copyright>Copyright © 2021</Copyright>
99
<Description>The Azure Service Bus publishing/messaging &amp; receiving implementation of the SqlTransactionalOutbox framework.
@@ -16,7 +16,7 @@ A lightweight library &amp; framework for implementing the Transactional Outbox
1616
<PackageTags>sql server sqlserver sql-server transactional outbox transactional-outbox outbox-pattern microservice eventservices event-services event-notifications azure service bus azurefunctions azure-functions</PackageTags>
1717
<PackageReleaseNotes>
1818
Release Notes:
19-
- Bump version along with SqlTransactionalOutbox.Common.
19+
- Bump version for new Release.
2020

2121
Prior Release Notes:
2222
- (Breaking Changes) Fully migrated to Azure.Messaging.ServiceBus SDK/Library for future support; other AzureServiceBus libraries are all fully deprecated by Microsoft.

SqlTransactionalOutbox.Common/SqlTransactionalOutbox.Common.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
55
<RootNamespace>SqlTransactionalOutbox</RootNamespace>
6-
<Version>1.0.1</Version>
6+
<Version>1.0.2</Version>
77
<Authors>BBernard / CajunCoding</Authors>
88
<Copyright>Copyright © 2021</Copyright>
99
<Description>The Common interfaces and base/shared components for the SqlTransactionalOutbox framework.
@@ -16,9 +16,10 @@ A lightweight library &amp; framework for implementing the Transactional Outbox
1616
<PackageTags>sql server sqlserver sql-server transactional outbox transactional-outbox outbox-pattern microservice eventservices event-services event-notifications azure service bus azurefunctions azure-functions</PackageTags>
1717
<PackageReleaseNotes>
1818
Release Notes:
19-
- Improved support for customizing OutboxTable Configuration and Distributed Mutex Lock settings via SqlTransactionalOutboxInitializer.Configure() initialization.
19+
- Bump version for new Release.
2020

2121
Prior Release Notes:
22+
- Improved support for customizing OutboxTable Configuration and Distributed Mutex Lock settings via SqlTransactionalOutboxInitializer.Configure() initialization.
2223
- (Breaking Changes) Fully migrated to Azure.Messaging.ServiceBus SDK/Library for future support; other AzureServiceBus libraries are all fully deprecated by Microsoft.
2324
- The main breaking change is now the use of ServiceBusReceivedMessage vs deprecated Message object.
2425
- All Interfaces and the genearl abstraction are still valid so code updates are straightforward.

SqlTransactionalOutbox.IntegrationTests/ConfigurationTests/InitializationTests.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using System;
2+
using Microsoft.Data.SqlClient;
23
using Microsoft.VisualStudio.TestTools.UnitTesting;
34
using SqlTransactionalOutbox.IntegrationTests.ConfigurationTests;
5+
using SqlTransactionalOutbox.SqlServer.MicrosoftDataNS;
46

57
namespace SqlTransactionalOutbox.IntegrationTests
68
{
@@ -18,6 +20,13 @@ public void Initialize()
1820
SqlTransactionalOutboxInitializer.Configure(c => c.ResetToDefaults());
1921
}
2022

23+
[TestCleanup]
24+
public void Cleanup()
25+
{
26+
//Ensure that our Configuration matches the Default values which all tests to assume...
27+
SqlTransactionalOutboxInitializer.Configure(c => c.ResetToDefaults());
28+
}
29+
2130
[TestMethod]
2231
public void TestSqlTransactionalOutboxInitializationConfigurationBuilder()
2332
{

SqlTransactionalOutbox.IntegrationTests/ConfigurationTests/OutboxTableConfigTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ public void Initialize()
1818
SqlTransactionalOutboxInitializer.Configure(c => c.ResetToDefaults());
1919
}
2020

21+
[TestCleanup]
22+
public void Cleanup()
23+
{
24+
//Ensure that our Configuration matches the Default values which all tests to assume...
25+
SqlTransactionalOutboxInitializer.Configure(c => c.ResetToDefaults());
26+
}
27+
2128
[TestMethod]
2229
public void TestCustomImplementationOfOutboxTableConfigOverrides()
2330
{

SqlTransactionalOutbox.SqlServer.Common/SqlTransactionalOutbox.SqlServer.Common.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
55
<RootNamespace>SqlTransactionalOutbox.SqlServer</RootNamespace>
6-
<Version>1.0.1</Version>
6+
<Version>1.0.2</Version>
77
<Authors>BBernard / CajunCoding</Authors>
88
<Copyright>Copyright © 2021</Copyright>
99
<Description>The Common interfaces and base/shared components for the SqlServer outbox implementation of SqlTransactionalOutbox framework.
@@ -16,9 +16,10 @@ A lightweight library &amp; framework for implementing the Transactional Outbox
1616
<PackageTags>sql server sqlserver sql-server transactional outbox transactional-outbox outbox-pattern microservice eventservices event-services event-notifications azure service bus azurefunctions azure-functions</PackageTags>
1717
<PackageReleaseNotes>
1818
Release Notes:
19-
- Improved support for customizing OutboxTable Configuration and Distributed Mutex Lock settings via SqlTransactionalOutboxInitializer.Configure() initialization.
19+
- Bump version for new Release.
2020

2121
Prior Release Notes:
22+
- Improved support for customizing OutboxTable Configuration and Distributed Mutex Lock settings via SqlTransactionalOutboxInitializer.Configure() initialization.
2223
- Improved Error Handling support for when Processing of Outbox has unexpected Exceptions.
2324
- Bump version of SqlTransactionalOutbox.Common.
2425
- Initial BETA release for default implementations of SQL Server transactional outbox.

SqlTransactionalOutbox.SqlServer.MicrosoftDataNS/DefaultSqlServerOutboxRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public DefaultSqlServerOutboxRepository(
1313
)
1414
: base (
1515
sqlTransaction: sqlTransaction,
16-
outboxTableConfig: outboxTableConfig ?? new OutboxTableConfig(),
16+
outboxTableConfig: outboxTableConfig ?? SqlTransactionalOutboxDefaults.OutboxTableConfig,
1717
outboxItemFactory: outboxItemFactory ?? new DefaultOutboxItemFactory<TPayload>(),
1818
distributedMutexAcquisitionTimeoutSeconds
1919
)

SqlTransactionalOutbox.SqlServer.MicrosoftDataNS/SqlTransactionalOutbox.SqlServer.MicrosoftDataNS.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
55
<RootNamespace>SqlTransactionalOutbox.SqlServer</RootNamespace>
6-
<Version>1.0.1</Version>
6+
<Version>1.0.2</Version>
77
<Authors>BBernard / CajunCoding</Authors>
88
<Copyright>Copyright © 2021</Copyright>
99
<Description>The SQL Server outbox implementation of SqlTransactionalOutbox framework using the new Microsoft.Data.SqlClient libraries.
@@ -16,9 +16,10 @@ A lightweight library &amp; framework for implementing the Transactional Outbox
1616
<PackageTags>sql server sqlserver sql-server transactional outbox transactional-outbox outbox-pattern microservice eventservices event-services event-notifications azure service bus azurefunctions azure-functions</PackageTags>
1717
<PackageReleaseNotes>
1818
Release Notes:
19-
- Improved support for customizing OutboxTable Configuration and Distributed Mutex Lock settings via SqlTransactionalOutboxInitializer.Configure() initialization.
19+
- Fix bug in DefaultSqlServerOutboxRepository to use new customizable global configuration as Default.
2020

2121
Prior Release Notes:
22+
- Improved support for customizing OutboxTable Configuration and Distributed Mutex Lock settings via SqlTransactionalOutboxInitializer.Configure() initialization.
2223
- Also fixed several bugs/issues with Database loading of Null values.
2324
- Improved Error Handling when Processing of Outbox has unexpected Exceptions.
2425
- Bump version of SqlTransactionalOutbox.Common.

SqlTransactionalOutbox.SqlServer.SystemDataNS/DefaultSqlServerOutboxRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public DefaultSqlServerOutboxRepository(
1313
)
1414
: base (
1515
sqlTransaction: sqlTransaction,
16-
outboxTableConfig: outboxTableConfig ?? new OutboxTableConfig(),
16+
outboxTableConfig: outboxTableConfig ?? SqlTransactionalOutboxDefaults.OutboxTableConfig,
1717
outboxItemFactory: outboxItemFactory ?? new DefaultOutboxItemFactory<TPayload>(),
1818
distributedMutexAcquisitionTimeoutSeconds
1919
)

SqlTransactionalOutbox.SqlServer.SystemDataNS/SqlTransactionalOutbox.SqlServer.SystemDataNS.csproj

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<TargetFramework>netstandard2.1</TargetFramework>
55
<RootNamespace>SqlTransactionalOutbox.SqlServer</RootNamespace>
6-
<Version>1.0.1</Version>
6+
<Version>1.0.2</Version>
77
<Authors>BBernard / CajunCoding</Authors>
88
<Copyright>Copyright © 2021</Copyright>
99
<Description>The SQL Server outbox implementation of SqlTransactionalOutbox framework using legacy System.Data.SqlClient libraries.
@@ -15,12 +15,13 @@ A lightweight library &amp; framework for implementing the Transactional Outbox
1515
<RepositoryUrl>https://github.com/cajuncoding/SqlTransactionalOutbox</RepositoryUrl>
1616
<PackageTags>sql server sqlserver sql-server transactional outbox transactional-outbox outbox-pattern microservice eventservices event-services event-notifications azure service bus azurefunctions azure-functions</PackageTags>
1717
<PackageReleaseNotes>
18-
Release Notes:
19-
- Improved support for customizing OutboxTable Configuration and Distributed Mutex Lock settings via SqlTransactionalOutboxInitializer.Configure() initialization.
18+
Release Notes:
19+
- Fix bug in DefaultSqlServerOutboxRepository to use new customizable global configuration as Default.
2020

2121
Prior Release Notes:
22-
- Also fixed several bugs/issues with Database loading of Null values.
23-
- Improved Error Handling when Processing of Outbox has unexpected Exceptions.
22+
- Improved support for customizing OutboxTable Configuration and Distributed Mutex Lock settings via SqlTransactionalOutboxInitializer.Configure() initialization.
23+
- Also fixed several bugs/issues with Database loading of Null values.
24+
- Improved Error Handling when Processing of Outbox has unexpected Exceptions.
2425
- Bump version of SqlTransactionalOutbox.Common.
2526
- Fix bug with Null values not being set correctly when Adding/Updating Outbox Items.
2627
- Initial BETA release for default implementations of SQL Server transactional outbox.

0 commit comments

Comments
 (0)