diff --git a/src/SampleBatch.Components/StateMachines/BatchJobStateMachine.cs b/src/SampleBatch.Components/StateMachines/BatchJobStateMachine.cs index bc8ff31..5817f35 100644 --- a/src/SampleBatch.Components/StateMachines/BatchJobStateMachine.cs +++ b/src/SampleBatch.Components/StateMachines/BatchJobStateMachine.cs @@ -21,7 +21,7 @@ public BatchJobStateMachine() .Then(context => Touch(context.Saga, context.Message.Timestamp)) .Then(context => SetReceiveTimestamp(context.Saga, context.Message.Timestamp)) .Then(Initialize) - .Send(context => context.Init(new + .PublishAsync(context => context.Init(new { BatchJobId = context.Saga.CorrelationId, InVar.Timestamp, diff --git a/src/SampleBatch.Service/Program.cs b/src/SampleBatch.Service/Program.cs index e71abd7..5488482 100644 --- a/src/SampleBatch.Service/Program.cs +++ b/src/SampleBatch.Service/Program.cs @@ -83,9 +83,6 @@ static async Task Main(string[] args) { y.Host(appConfig.AzureServiceBus.ConnectionString); - var endpointNameFormatter = x.GetRequiredService(); - EndpointConvention.Map(new Uri($"queue:{endpointNameFormatter.Consumer()}")); - y.UseServiceBusMessageScheduler(); y.ConfigureEndpoints(x); @@ -101,9 +98,6 @@ static async Task Main(string[] args) h.Password(appConfig.RabbitMq.Password); }); - var endpointNameFormatter = x.GetRequiredService(); - EndpointConvention.Map(new Uri($"queue:{endpointNameFormatter.Consumer()}")); - y.UseInMemoryScheduler(); y.ConfigureEndpoints(x);