MigratoryData Client API for DotNet
Developer's Guide and Reference Manual
|
This guide includes the following sections:
This application programming interface (API) contains all the necessary operations for connecting to a cluster of one or more MigratoryData servers, subscribing to subjects, getting real-time messages for the subscribed subjects, and publishing real-time messages.
Before reading this manual, it is recommended to read MigratoryData Architecture Guide (PDF, HTML).
A typical API usage is as follows:
Import in your application the classes of this API as follows:
using com.migratorydata.client;
Also, add this API library migratorydata-client-dotnet.dll
, located in the folder lib
of this API package, to the references of your .NET application.
The log listener should implement the MigratoryDataLogListener interface.
Use the API call MigratoryDataClient.SetLogListener() to assign an instance of the log listener for getting the logs of the API.
The listener should implement the MigratoryDataListener interface.
Use the API call MigratoryDataClient.SetListener() to assign an instance of the listener for getting inbound messages and status notifications.
Use the API method MigratoryDataClient.SetServers() to specify a list of one or more MigratoryData servers to which the client will connect to. In fact, the client will connect to only one of the MigratoryData servers in this list. But, defining two or more MigratoryData servers is recommended to achieve load balancing and failover. Supposing the MigratoryData server – to which the client connected – goes down, then the API will automatically reconnect to another MigratoryData server in the list.
Use the API method MigratoryDataClient.Subscribe() to subscribe to subjects and use the API method MigratoryDataClient.Publish() to publish messages.
Handle the messages received for the subscribed subjects as well as the status notifications in the class you defined at Step 3 above.
Examples built with this API are available in the folder examples
of this API package; start with the README file which explains how to compile and run them.