Skip to content

Commit f3d35e5

Browse files
authored
Added IBM MQ transport (#617)
1 parent 1740e9a commit f3d35e5

4 files changed

Lines changed: 23 additions & 0 deletions

File tree

src/ParticularTemplates/NServiceBusEndpoint/.template.config/ide.host.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@
5151
"name": {
5252
"text": "PostgreSQL"
5353
}
54+
},
55+
{
56+
"id": "IBMMQ",
57+
"name": {
58+
"text": "IBM MQ"
59+
}
5460
}
5561
]
5662
},

src/ParticularTemplates/NServiceBusEndpoint/.template.config/template.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@
6262
{
6363
"choice": "PostgreSQL",
6464
"description": "PostgreSQL"
65+
},
66+
{
67+
"choice": "IBMMQ",
68+
"description": "IBM MQ"
6569
}
6670
],
6771
"defaultValue": "LearningTransport"

src/ParticularTemplates/NServiceBusEndpoint/Program.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,18 @@
6161
// PostgreSQL Transport: https://docs.particular.net/transports/postgresql/
6262
var transport = new PostgreSqlTransport("Server=localhost;Port=5432;Database=dbname;User Id=user;Password=pass;");
6363
var routing = endpointConfiguration.UseTransport(transport);
64+
#elseif (transport == "IBMMQ")
65+
// IBM MQ Transport: https://docs.particular.net/transports/ibmmq/
66+
var transport = new IBMMQTransport
67+
{
68+
Host = "localhost",
69+
Port = 1414,
70+
Channel = "DEV.ADMIN.SVRCONN",
71+
QueueManagerName = "QM1",
72+
User = "admin",
73+
Password = "passw0rd"
74+
};
75+
var routing = endpointConfiguration.UseTransport(transport);
6476
#endif
6577

6678
// Define routing for commands: https://docs.particular.net/nservicebus/messaging/routing#command-routing

src/ParticularTemplates/NServiceBusEndpoint/ProjectName.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
<PackageReference Condition="'$(transport)' == 'AzureServiceBus'" Include="NServiceBus.Transport.AzureServiceBus" Version="6.*" />
1919
<PackageReference Condition="'$(transport)' == 'AzureStorageQueues'" Include="NServiceBus.Transport.AzureStorageQueues" Version="14.*" />
2020
<PackageReference Condition="'$(transport)' == 'PostgreSQL'" Include="NServiceBus.Transport.PostgreSql" Version="9.*" />
21+
<PackageReference Condition="'$(transport)' == 'IBMMQ'" Include="NServiceBus.Transport.IBMMQ" Version="1.*" />
2122
<PackageReference Condition="'$(transport)' == 'RabbitMQ'" Include="NServiceBus.RabbitMQ" Version="11.*" />
2223
<PackageReference Condition="'$(transport)' == 'SQL'" Include="NServiceBus.Transport.SqlServer" Version="9.*" />
2324
<PackageReference Condition="'$(transport)' == 'SQS'" Include="NServiceBus.AmazonSQS" Version="9.*" />

0 commit comments

Comments
 (0)