Skip to content

Commit

Permalink
Removed used of EndpointConvention
Browse files Browse the repository at this point in the history
  • Loading branch information
phatboyg committed Apr 21, 2022
1 parent 9886c9b commit 6d774db
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<ProcessBatchJob>(new
.PublishAsync(context => context.Init<ProcessBatchJob>(new
{
BatchJobId = context.Saga.CorrelationId,
InVar.Timestamp,
Expand Down
6 changes: 0 additions & 6 deletions src/SampleBatch.Service/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,6 @@ static async Task Main(string[] args)
{
y.Host(appConfig.AzureServiceBus.ConnectionString);

var endpointNameFormatter = x.GetRequiredService<IEndpointNameFormatter>();
EndpointConvention.Map<ProcessBatchJob>(new Uri($"queue:{endpointNameFormatter.Consumer<ProcessBatchJobConsumer>()}"));

y.UseServiceBusMessageScheduler();

y.ConfigureEndpoints(x);
Expand All @@ -101,9 +98,6 @@ static async Task Main(string[] args)
h.Password(appConfig.RabbitMq.Password);
});

var endpointNameFormatter = x.GetRequiredService<IEndpointNameFormatter>();
EndpointConvention.Map<ProcessBatchJob>(new Uri($"queue:{endpointNameFormatter.Consumer<ProcessBatchJobConsumer>()}"));

y.UseInMemoryScheduler();

y.ConfigureEndpoints(x);
Expand Down

0 comments on commit 6d774db

Please sign in to comment.