Skip to content

Commit

Permalink
-added: EasyNetQ custom service registration
Browse files Browse the repository at this point in the history
-bumped version to 1.29.0
  • Loading branch information
martinzima committed Mar 1, 2022
1 parent fad486f commit d329ea8
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Revo.Core.Configuration;
using System;
using EasyNetQ.DI;
using Revo.Core.Configuration;

namespace Revo.EasyNetQ.Configuration
{
Expand All @@ -8,5 +10,6 @@ public class EasyNetQConfigurationSection : IRevoConfigurationSection
public EasyNetQConnectionConfiguration Connection { get; set; } = new EasyNetQConnectionConfiguration("host=localhost");
public EasyNetQSubscriptionsConfiguration Subscriptions { get; set; } = new EasyNetQSubscriptionsConfiguration();
public EasyNetQEventTransportsConfiguration EventTransports { get; set; } = new EasyNetQEventTransportsConfiguration();
public Action<IServiceRegister> RegisterServices { get; set; }
}
}
6 changes: 5 additions & 1 deletion Providers/EasyNetQ/Revo.EasyNetQ/EasyNetQModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ public override void Load()
.InSingletonScope();

Bind<IBus>()
.ToMethod(ctx => RabbitHutch.CreateBus(configurationSection.Connection.ConnectionString))
.ToMethod(ctx => RabbitHutch.CreateBus(configurationSection.Connection.ConnectionString,
serviceRegister =>
{
configurationSection.RegisterServices?.Invoke(serviceRegister);
}))
.InSingletonScope();

Bind<IEasyNetQBus>()
Expand Down
5 changes: 5 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# RELEASE NOTES

## [1.29.0] - 2022-03-01

### Added
- EasyNetQ custom service registration

## [1.28.1] - 2022-02-03

### Fixed
Expand Down

0 comments on commit d329ea8

Please sign in to comment.