Apache Qpid Messaging API
The .NET Binding for the C++ Qpid Messaging Client is a library that gives any .NET program access to Qpid C++ Messaging objects and methods. These bindings provide mappings between classes in the .NET Binding and the underlying C++ Messaging API. Since the .NET binding provides only a wrapper around the C++ library, the .NET library supports all features of the C++ library including the AMQP 1.0 support.
The binding consists of following two components:
- .NET Messaging Binding Library
Provides access to unmanaged, native Qpid Messaging C++ core run time system
- .NET Messaging Managed Callback Library
An extension of the .NET Messaging Binding Library that provides message callbacks in a managed .NET environment.
The mechanism of creating the Connection, Session, Receiver/Producer objects is the same as in the underlying C++ API with the respect of .NET naming conventions and garbage collection. Regarding receiving messages, the .NET callback library provides additional mechanism for asynchronous message reception by the registered callback object (implementing the ISessionReceiver interface). The asynchronous receiver is used in the “BroadcastReceiver” source code example (see chapter 1.9 for more details).
.NET bindings propagate all the underlying Qpid exceptions from the C++ layer in one common QpidException. Therefore, one cannot distinguish in the common catch block in which situation was the exception thrown and what exactly was caused by this exception (e.g. when the thrown exception invalidates the session or even the connection). It is recommended to check the session (Session.HasError) and connection (Connection.IsOpen) and eventually to re-initialize them.