File tree Expand file tree Collapse file tree
src/Services/Payment/Payment.API Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,3 +90,5 @@ services:
9090 build :
9191 context : ./src/Services/Payment/Payment.API
9292 dockerfile : Dockerfile
93+ depends_on :
94+ - rabbitmq
Original file line number Diff line number Diff line change 1111using Microsoft . eShopOnContainers . BuildingBlocks . EventBusRabbitMQ ;
1212using RabbitMQ . Client ;
1313using Microsoft . eShopOnContainers . BuildingBlocks . EventBus ;
14+ using Payment . API . IntegrationEvents ;
1415
1516namespace Payment . API
1617{
@@ -34,6 +35,7 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
3435 // Add framework services.
3536 services . AddMvc ( ) ;
3637
38+ services . AddTransient < IPaymentIntegrationEventService , PaymentIntegrationEventService > ( ) ;
3739 services . AddSingleton < IRabbitMQPersistentConnection > ( sp =>
3840 {
3941 var logger = sp . GetRequiredService < ILogger < DefaultRabbitMQPersistentConnection > > ( ) ;
@@ -45,10 +47,10 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
4547
4648 return new DefaultRabbitMQPersistentConnection ( factory , logger ) ;
4749 } ) ;
48-
4950 services . AddSingleton < IEventBus , EventBusRabbitMQ > ( ) ;
5051 services . AddSingleton < IEventBusSubscriptionsManager , InMemoryEventBusSubscriptionsManager > ( ) ;
5152 services . AddTransient < IIntegrationEventHandler < PayOrderCommandMsg > > ( ) ;
53+
5254
5355 services . AddSwaggerGen ( ) ;
5456 services . ConfigureSwaggerGen ( options =>
You can’t perform that action at this time.
0 commit comments