Exemplo n.º 1
0
 protected override ReceiveEndpointConfig[] RegisterRabbitMqEndpoints()
 => new[]
 {
     ReceiveEndpointConfig.Create(Configuration["RABBITMQ_ORDER_QUEUE_NAME"],
                                  (context) =>
                                  (endpointConfigurator) =>
     {
         endpointConfigurator.ConfigureConsumer <AvailableDriverFoundConsumer>(context);
         endpointConfigurator.ConfigureConsumer <OrderCancelledConsumer>(context);
         endpointConfigurator.ConfigureConsumer <RideFinishedConsumer>(context);
     })
 };
Exemplo n.º 2
0
 protected override ReceiveEndpointConfig[] RegisterRabbitMqEndpoints()
 => new[]
 {
     ReceiveEndpointConfig.Create(Configuration["RABBITMQ_ORDER_QUEUE_NAME"],
                                  (context) =>
                                  (endpointConfigurator) =>
     {
         endpointConfigurator.ConfigureConsumer <OrderCreatedConsumer>(context);
         endpointConfigurator.ConfigureConsumer <OrderCompletedConsumer>(context);
         endpointConfigurator.ConfigureConsumer <RideTerminatedConsumer>(context);
     }),
     ReceiveEndpointConfig.Create(Configuration["RABBITMQ_RIDE_QUEUE_NAME"],
                                  (context) =>
                                  (endpointConfigurator) =>
     {
         endpointConfigurator.ConfigureConsumer <CustomerPickedUpConsumer>(context);
         endpointConfigurator.ConfigureConsumer <CustomerRatedConsumer>(context);
     })
 };