Configuring the Msmq Transport Service

This page explains how you can configure the Msmq Transport Service, either by config string or by fluent interface. Note that Microsoft Message Queueing must be activated on your computer if you want to use this transport service. You can find more details about Msmq here.

Config String

With the config string the following options can be configured:
  • msmq.queuename: Configures the name of the message queue that should be used.
  • msmq.disposequeue: Configures if the message queue should automatically be removed when the transport service is stopped (meaning when the appspace instance is disposed).
  • msmq.name: Configures the name of the transport service. A name should be assigned if the space instance uses multiple transport services.
  • msmq.isdefault: Configures if the transport service is used by default for connecting to other workers (one service should be configured as default, if multiple transport services are used).
Here is an example:
var space = new XcoAppSpace(@"msmq.queuename=.\private$\TestAppSpace;msmq.isdefault=true;msmq.name=msmqservice;msmq.disposequeue=true");

Fluent Inferface

The fluent interface provides methods equal to the config string elements:
  • WithQueueName(string name): Configures the name of the message queue that should be used.
  • WithRemoveQueueOnStop(): Configures that the message queue should automatically be removed when the transport service is stopped (meaning when the appspace instance is disposed).
  • WithName(string name): Configures the name of the transport service. A name should be assigned if the space instance uses multiple transport services.
  • AsDefault(): Configures that the transport service is used by default for connecting to other workers (one service should be configured as default, if multiple transport services are used).
  • WithSerializer(string name): Allows defining which serializer is used for this transport service, if there are multiple named serializers defined for this appspace instance (use the .WithName() fluent config method to define the serializer name). Note: this is only needed if you have multiple transport services, and want to communicate using a different serializer for each of them.
Here is an example:
XcoAppSpace space = XcoAppSpace.Configure.UsingService(new XcoMSMQTransportService()).WithQueueName(@".\private$\TestAppSpace").WithRemoveQueueOnStop();

Last edited Dec 21, 2012 at 12:57 PM by thomass, version 3

Comments

No comments yet.