i have migrated NServiceBus.WebSphereMQ to the version 5 of NServiceBus. Having used the solution for a P.O.C. the implementation is not very elegant and, therefore, I have not had the courage to publish it on Git Hub :-D.
In the P.O.C. i have created two endpoints using the NServiceBus.WebSphereMQ transport.
The configuration is quite simple.
Inside each Endpoint's config file (app.config) i have specified the following settings:
<configSections>
...
<section name="MessageForwardingInCaseOfFaultConfig" type="NServiceBus.Config.MessageForwardingInCaseOfFaultConfig, NServiceBus.Core" />
<section name="AuditConfig" type="NServiceBus.Config.AuditConfig, NServiceBus.Core" />
...
</configSections>
<AuditConfig QueueName="audit" />
<MessageForwardingInCaseOfFaultConfig ErrorQueue="error" />
...
<connectionStrings>
<add name="NServiceBus/Transport" connectionString="hostname=localhost;port=1414;queueManager=NEOS;channel=NEOS;" />
</connectionStrings>
It's important to pay attention to the connection string. QueueManager name and Channel name are very important informations and will be specified later. Using ServiceMatrix for VisualStudio 2013, i have automatically generated the EndpointConfig file, specifying the transport's logic inside:
public partial class EndpointConfig : IConfigureThisEndpoint, AsA_Server
{
public void Customize(BusConfiguration configuration)
{
configuration.UseSerialization<JsonSerializer>();
configuration.UsePersistence<InMemoryPersistence>();
configuration.UseTransport<WebSphereMQ>();
}
}
That's all code side.
To test the communication using MQ, i downloaded WebSphere MQ Advanced from the IBM website ( it's free ): http://www-01.ibm.com/support/docview.wss?uid=swg24032734 If you install the version 7.5, remember to install the recommended hotfixes!
First of all you have to configure a QueueManager. To do this i used WebSphere MQ Explorer tool as shown below:
Then, you must create a Server-Connection channel:
To use the channel you must provide grant authorization
At this point each Endpoint is able to create all queues automatically the first time running. It works great!
I hope I was helpful