You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

An Overview of NMS

The NMS API (.Net Message Service API) providers a standard .NET interface to Messaging Systems. There could be multiple implementations to different providers (including MSMQ).

NMS API currently supports all of the features of JMS in a simple pure C# API and implementation apart from XA. Current features include

  • creating & disposing of connections, sessions, producers, consumers
  • sending of messages to topics, queues with durable or non durable along with temporary destination support
  • synchronous consuming (blocking receive, receive with no wait or receive with a timeout)
  • asynchronous consuming (adding a MessageListener to be dispatched in the thread pool)
  • JMS message header support along with custom properties
  • Text, Bytes, Stream and Map message support
  • support for JMS transactions (sending and acknowledging multiple messages in an atomic transaction)
  • redelivery of messages in rollbacks up to some configured maximum redelivery count
  • Optional Queue browser interface for providers that can support it.
  • Optional .NET Distributed Transaction Support for providers that can support that.

A provider implementation based on a pure C# implementation of OpenWire is provided for working with the Apache ActiveMQ broker.  There are other provider implementations for working with Stomp, TIBCO, Microsoft Message Queue (MSMQ), and Windows Communication Foundation (WCF).

If you are curious you can browse the source code and tests for the entire project or follow the links in the next section to download a specific NMS Provider.

NMS Providers

An NMS Provider is a .NET Assembly that provides an implementation of the NMS API that provides connectivity with a particular Messaging Service or an implementation of a standard Messaging Protocol. Currently, the following providers are available:

  • ActiveMQ client which communicates with ActiveMQ using its own native wire protocol and provides many advanced features beyond the standard NMS API.
  • STOMP which connects to any STOMP Broker.  Also, when coupled with StompConnect, NMS can be used to communicate with pretty much any existing MOM provider! (Or at least those that support JMS which most MOM providers do).
  • MSMQ is an implementation of NMS using Microsoft's MSMQ API.
  • EMS provider for talking to TIBCO's EMS message broker.  To use this, you will need to following TIBCO's licensing requirements to acquire the TIBCO client assembly DLL.  NMS does not ship with the TIBCO client assembly.
  • WCF provides support of Windows Communications Framework.
  • AMQP is an implementation of NMS using the Apache Qpid Messaging API. AMQP 1.0 protocol support is provided by Apache Qpid Proton.
  • MQTT provider uses the publish-subscribe pattern that is a "light weight" messaging protocol for use on top of the TCP/IP protocol
  • XMS provider connects to the IBM WebSphere MQ Series broker.

Building the code

While there are binary distributions available for all the NMS Providers you sometimes might want to build the code from trunk in order to test out the latest changes or fixes. On Windows you can use Visual Studio to build the code. On Linux or OS X you can use Mono.

The build uses NAnt which both work on .Net and Mono.  You will need to have NAnt 0.91-Alpha2 or later.

For more help see the Building NMS guide.

Alternatives to NMS

There are currently a few alternatives to using NMS and working with ActiveMQ in .NET applications however the NMS ActiveMQ Provider is very feature rich and we recommend it as your starting point for .NET ActiveMQ inter-op.

  • No labels