Skip to content

Commit

Permalink
Switch to rabbit
Browse files Browse the repository at this point in the history
  • Loading branch information
boblangley committed Jun 6, 2022
1 parent c1803f8 commit 52f5682
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Billing/Billing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
<ItemGroup>
<PackageReference Include="NServiceBus" Version="7.*" />
<PackageReference Include="NServiceBus.Storage.MongoDB" Version="2.2.0" />
<PackageReference Include="NServiceBus.RabbitMQ" Version="5.*" />
<PackageReference Include="RabbitMQ.Client" Version="5.*" />
<ProjectReference Include="..\Messages\Messages.csproj" />
</ItemGroup>
</Project>
7 changes: 6 additions & 1 deletion Billing/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ static async Task Main()

var endpointConfiguration = new EndpointConfiguration("Billing");

var transport = endpointConfiguration.UseTransport<LearningTransport>();
endpointConfiguration.EnableInstallers();

var transport = endpointConfiguration.UseTransport<RabbitMQTransport>();
transport.UseConventionalRoutingTopology();
transport.ConnectionString("host=localhost");

var persistence = endpointConfiguration.UsePersistence<MongoPersistence>();
persistence.DatabaseName("Tutorial_Billing");

Expand Down
4 changes: 3 additions & 1 deletion ClientUI/ClientUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NServiceBus" Version="7.*" />
<ProjectReference Include="..\Messages\Messages.csproj" />
<PackageReference Include="NServiceBus.Storage.MongoDB" Version="2.2.0" />
<PackageReference Include="NServiceBus.RabbitMQ" Version="5.*" />
<ProjectReference Include="..\Messages\Messages.csproj" />
</ItemGroup>
</Project>
7 changes: 6 additions & 1 deletion ClientUI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ static async Task Main()

var endpointConfiguration = new EndpointConfiguration("ClientUI");

var transport = endpointConfiguration.UseTransport<LearningTransport>();

endpointConfiguration.EnableInstallers();

var transport = endpointConfiguration.UseTransport<RabbitMQTransport>();
transport.UseConventionalRoutingTopology();
transport.ConnectionString("host=localhost");

var routing = transport.Routing();
routing.RouteToEndpoint(typeof(PlaceOrder), "Sales");
Expand Down
6 changes: 5 additions & 1 deletion Sales/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ static async Task Main()

var endpointConfiguration = new EndpointConfiguration("Sales");

var transport = endpointConfiguration.UseTransport<LearningTransport>();
endpointConfiguration.EnableInstallers();

var transport = endpointConfiguration.UseTransport<RabbitMQTransport>();
transport.UseConventionalRoutingTopology();
transport.ConnectionString("host=localhost");

var persistence = endpointConfiguration.UsePersistence<MongoPersistence>();
persistence.DatabaseName("Tutorial_Sales");
Expand Down
2 changes: 2 additions & 0 deletions Sales/Sales.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
<ItemGroup>
<PackageReference Include="NServiceBus" Version="7.*" />
<PackageReference Include="NServiceBus.Storage.MongoDB" Version="2.2.0" />
<PackageReference Include="NServiceBus.Storage.MongoDB" Version="2.2.0" />
<PackageReference Include="NServiceBus.RabbitMQ" Version="5.*" />
<ProjectReference Include="..\Messages\Messages.csproj" />
</ItemGroup>
</Project>
7 changes: 6 additions & 1 deletion Shipping/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ static async Task Main()

var endpointConfiguration = new EndpointConfiguration("Shipping");

var transport = endpointConfiguration.UseTransport<LearningTransport>();
endpointConfiguration.EnableInstallers();

var transport = endpointConfiguration.UseTransport<RabbitMQTransport>();
transport.UseConventionalRoutingTopology();
transport.ConnectionString("host=localhost");

var persistence = endpointConfiguration.UsePersistence<MongoPersistence>();
persistence.DatabaseName("Tutorial_Shipping");

Expand Down
2 changes: 2 additions & 0 deletions Shipping/Shipping.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
<ItemGroup>
<PackageReference Include="NServiceBus" Version="7.*" />
<PackageReference Include="NServiceBus.Storage.MongoDB" Version="2.2.0" />
<PackageReference Include="NServiceBus.Storage.MongoDB" Version="2.2.0" />
<PackageReference Include="NServiceBus.RabbitMQ" Version="5.*" />
<ProjectReference Include="..\Messages\Messages.csproj" />
</ItemGroup>
</Project>

0 comments on commit 52f5682

Please sign in to comment.