|
2 | 2 |
|
3 | 3 | ## Overview |
4 | 4 |
|
5 | | -This .NET Aspire Integration runs [Active MQ Classig](https://activemq.apache.org/components/classic/) in a container. |
6 | | - |
| 5 | +This .NET Aspire Integration can be used to [Active MQ Classic](https://activemq.apache.org/components/classic/) and [Active MQ Artemis](https://activemq.apache.org/components/artemis/) in a container. |
7 | 6 |
|
8 | 7 | ## Usage |
9 | 8 |
|
10 | | -### Example 1: ActiveMQ with default tcp scheme |
| 9 | +### Example 1: ActiveMQ Classic with default tcp scheme |
| 10 | + |
| 11 | +```csharp |
| 12 | +var builder = DistributedApplication.CreateBuilder(args); |
| 13 | + |
| 14 | +var amq = builder.AddActiveMQ("amq", |
| 15 | + builder.AddParameter("user", "admin"), |
| 16 | + builder.AddParameter("password", "admin", secret: true), |
| 17 | + 61616, |
| 18 | + webPort: 8161); |
| 19 | +``` |
| 20 | + |
| 21 | +### Example 2: ActiveMQ Classic with activemq scheme for use with [MassTransit](https://masstransit.io/) |
| 22 | + |
| 23 | +```csharp |
| 24 | +var builder = DistributedApplication.CreateBuilder(args); |
| 25 | + |
| 26 | +var amq = builder.AddActiveMQ("amq", |
| 27 | + builder.AddParameter("user", "admin"), |
| 28 | + builder.AddParameter("password", "admin", secret: true), |
| 29 | + 61616, |
| 30 | + "activemq", |
| 31 | + webPort: 8161); |
| 32 | +``` |
| 33 | + |
| 34 | +### Example 3: ActiveMQ Artemis with default tcp scheme |
11 | 35 |
|
12 | 36 | ```csharp |
13 | 37 | var builder = DistributedApplication.CreateBuilder(args); |
14 | 38 |
|
15 | | -var amq = builder.AddActiveMQ("amq", |
| 39 | +var amq = builder.AddActiveMQArtemis("amq", |
16 | 40 | builder.AddParameter("user", "admin"), |
17 | | - builder.AddParameter("password", "admin", secret: true), |
18 | | - 61616) |
19 | | - .PublishAsConnectionString() |
20 | | - .WithEndpoint(port: 8161, targetPort: 8161, name: "web", scheme: "http"); |
| 41 | + builder.AddParameter("password", "admin", secret: true), |
| 42 | + 61616, |
| 43 | + webPort: 8161); |
21 | 44 | ``` |
22 | 45 |
|
23 | | -### Example 2: ActiveMQ with activemq scheme for use with [MassTransit](https://masstransit.io/) |
| 46 | +### Example 2: ActiveMQ Artemis with activemq scheme for use with [MassTransit](https://masstransit.io/) |
24 | 47 |
|
25 | 48 | ```csharp |
26 | 49 | var builder = DistributedApplication.CreateBuilder(args); |
27 | 50 |
|
28 | | -var amq = builder.AddActiveMQ("amq", |
| 51 | +var amq = builder.AddActiveMQArtemis("amq", |
29 | 52 | builder.AddParameter("user", "admin"), |
30 | | - builder.AddParameter("password", "admin", secret: true), |
31 | | - 61616, |
32 | | - "activemq") |
33 | | - .PublishAsConnectionString() |
34 | | - .WithEndpoint(port: 8161, targetPort: 8161, name: "web", scheme: "http"); |
| 53 | + builder.AddParameter("password", "admin", secret: true), |
| 54 | + 61616, |
| 55 | + "activemq", |
| 56 | + webPort: 8161); |
35 | 57 | ``` |
0 commit comments