Skip to content

Commit

Permalink
Masstransit messages sample doco review (#6846)
Browse files Browse the repository at this point in the history
* Masstransit messages sample doco review

* Add net48 to NSB 7 sample

* Make NSB 8 and 9 samples use Quorum queues

* add net48 to NSB 7 sample - in all projects

* Update samples/pipeline/masstransit-messages/Core_8/NServiceBusSubscriber/Program.cs

* Update sample.md
  • Loading branch information
cquirosj committed Sep 23, 2024
1 parent d7e1b04 commit 3a01c16
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Worker">
<PropertyGroup>
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0;net48</TargetFrameworks>
<UserSecretsId>dotnet-MTEndpoint-0796FBA1-1278-479A-94F8-C8918B42B338</UserSecretsId>
<LangVersion>10.0</LangVersion>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0;net48</TargetFrameworks>
<LangVersion>10.0</LangVersion>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.Worker">
<PropertyGroup>
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
<TargetFrameworks>net8.0;net6.0;net48</TargetFrameworks>
<UserSecretsId>dotnet-NServiceBusSubscriber-573F9BD8-FB1A-4A4C-BC88-E4A997A00BE2</UserSecretsId>
<LangVersion>10.0</LangVersion>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static IHostBuilder CreateHostBuilder(string[] args)
#region Transport
var transport = endpointConfiguration.UseTransport<RabbitMQTransport>();
transport.ConnectionString("host=localhost;username=guest;password=guest");
transport.UseConventionalRoutingTopology(QueueType.Classic);
transport.UseConventionalRoutingTopology(QueueType.Quorum);
#endregion
#region Serializer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static void Main(string[] args)
#region Transport
var transport = endpointConfiguration.UseTransport<RabbitMQTransport>();
transport.ConnectionString("host=localhost;username=guest;password=guest");
transport.UseConventionalRoutingTopology(QueueType.Classic);
transport.UseConventionalRoutingTopology(QueueType.Quorum);
#endregion

#region Serializer
Expand Down
8 changes: 7 additions & 1 deletion samples/pipeline/masstransit-messages/sample.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Consuming MassTransit messages with NServiceBus
summary: Use the NServiceBus pipeline to consume messages sent by MassTransit.
reviewed: 2021-11-04
reviewed: 2024-09-22
component: Core
related:
- nservicebus/pipeline
Expand All @@ -16,6 +16,12 @@ downloadbutton

This sample requires a local instance of RabbitMQ.

The easiest way to do this is to run RabbitMQ in Docker by running the following command

```shell
docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
```

## Message structure comparison

When using a message structured like this:
Expand Down

0 comments on commit 3a01c16

Please sign in to comment.