These tutorials will get you up to speed and sending messages with Solace technology as quickly as possible. There are two ways you can get started:
- If your company has Solace message routers deployed, contact your middleware team to obtain the host name or IP address of a Solace message router to test against, a username and password to access it, and a VPN in which you can produce and consume messages.
- If you do not have access to a Solace message router, you will need to go through the “Set up a VMR” tutorial to download and install the software.
This repository contains code and matching tutorial walk throughs for five different basic Solace messaging patterns. For a nice introduction to the Solace API and associated tutorials, check out the tutorials home page.
This tutorial depends on you having the Solace Messaging API for C#/.NET (also referred to as SolClient for .NET) downloaded and installed for your project, and the instructions in this tutorial assume you successfully done it. If your environment differs then adjust the build instructions appropriately.
Here are a few easy ways to get this API.
Use the NuGet console or the NuGet Visual Studio Extension to download the SolaceSystems.Solclient.Messaging package for your solution and to install it for your project.
The package contains the required libraries and brief API documentation. It will automatically copy correct libraries from the package to the target directory at build time, but of course if you compile your program from the command line you would need to refer to the API assemblies and libraries locations explicitly.
Notice that in this case both x64 and x86 API assemblies and libraries have the same names.
The SolClient for .NET can be downloaded here. That distribution is a zip file containing the required libraries, detailed API documentation, and examples.
You would need either to update your Visual Studio project to point to the extracted assemblies and libraries, or to refer to their locations explicitly.
Notice that in this case x64 and x86 API assemblies and libraries have different names, e.g. the x86 API assembly is SolaceSystems.Solclient.Messaging.dll and the x64 API assembly is SolaceSystems.Solclient.Messaging_64.dll.
To check out the project and build it, do the following:
- clone this GitHub repository
cd solace-samples-dotnet
Building these examples is simple. The following provides an example. For ideas on how to build with other IDEs you can consult the README of the C# API library.
> csc /reference:SolaceSystems.Solclient.Messaging_64.dll /optimize /out:TopicPublisher.exe TopicPublisher.cs
> csc /reference:SolaceSystems.Solclient.Messaging_64.dll /optimize /out:TopicSubscriber.exe TopicSubscriber.cs
You need SolaceSystems.Solclient.Messaging_64.dll
(or SolaceSystems.Solclient.Messaging.dll
) at compile and runtime time and libsolclient.dll
at runtime in the same directory where your source and executables are.
Both DLLs are part of the Solace C#/.NET API distribution and located in solclient-dotnet\lib
directory of that distribution.
To try individual samples, build the project from source and then run samples like the following:
$ ./TopicSubscriber HOST
See the tutorials for more details.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
See the list of contributors who participated in this project.
This project is licensed under the Apache License, Version 2.0. - See the LICENSE file for details.
For more information try these resources:
- The Solace Developer Portal website at: http://dev.solace.com
- Get a better understanding of Solace technology.
- Check out the Solace blog for other interesting discussions around Solace technology
- Ask the Solace community.