Skip Ribbon Commands
Skip to main content
Navigate Up
Sign In

Quick Launch

Average Rating:

facebook Twitter
Print Bookmark Alert me when this article is updated


Quick Start: Building .NET UM sample application on Linux
UM version 6.12.1 introduced the Ultra Messaging .NET API to the Linux 64-bit platform.

The following is a reference example of steps taken to build the lbmsrc.cs sample application on Linux:



1. Install the 64-bit documentation and executable on a linux platform. You will find the lbmcs.dll in the bin/dotnet directory:
# cd /tmp
# sh
# unzip
# find UMS_6.12.1 -name lbmcs.dll​

2. Create a new directory for your application and copy over lbmsrc.cs and dependencies:
# mkdir APP_DIR
# cp /tmp/UM_6.12/doc/dotnet_example/VerifiableMessage.cs /tmp/APP_DIR/.
# cp /tmp/UM_6.12/doc/dotnet_example/lbmExampleUtil.cs /tmp/APP_DIR/.
# cp /tmp/UM_6.12/doc/dotnet_example/lbmsrc.cs /tmp/APP_DIR/.

3. Create a default console application project:
# cd /tmp/APP_DIR/.
# dotnet new console

  This should create new files in the directory:

# find

# cat ./APP_DIR.csproj

<Project Sdk="Microsoft.NET.Sdk">



4. Modify the .csproj file to include appropriate references to the relevant source files and libraries 

# cat APP_DIR.csproj

<Project Sdk="Microsoft.NET.Sdk">


    <Reference Include="lbmcs">
    <Reference Include="lbmcssdm">

    <Compile Include="lbmExampleUtil.cs">
    <Compile Include="lbmsrc.cs">
    <Compile Include="VerifiableMessage.cs" />


5. Build the project:

# dotnet build

Microsoft (R) Build Engine version 16.2.32702+c4012a063 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restore completed in 53.13 ms for /tmp/APP_DIR/APP_DIR.csproj.
  APP_DIR -> /tmp/APP_DIR/bin/Debug/netcoreapp2.2/APP_DIR.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:01.32

6. Run the application:

  Update your $PATH, $LD_LIBRARY_PATH and LICENCE as needed:

# export PATH=$PATH:/tmp/UMS_6.12.1/Linux-glibc-2.17-x86_64/bin/
# export LD_LIBRARY_PATH=/lib64:/tmp/UMS_6.12.1/Linux-glibc-2.17-x86_64/lib
# export LBM_LICENSE_FILENAME=/tmp/lic.txt

  Run the application:

# dotnet  /tmp/APP_DIR/bin/Debug/netcoreapp2.2/APP_DIR.dll -P 1000 -R M1g/1m mytopic

12/5/19 2:35:49 PM [Warning]: Core-9401-4: WARNING: default_interface for a context should be set to a valid network interface.

Will start sending in 1 second...

Sending 10000000 messages of size 25 bytes to topic [mytopic]

More Information
These exceptions may occur at run-time if the $LD_LIBRARY_PATH does not point to the UM install "/lib" directory:

Unhandled Exception: System.DllNotFoundException: Unable to load shared library 'Kernel32.dll' or one of its dependencies ...
Unhandled Exception: System.TypeInitializationException: The type initializer for 'com.latencybusters.lbm.LBM' threw an exception. ---> System.DllNotFoundException: Unable to load shared library 'lbm' or one of its dependencies.



Applies To
Product: Ultra Messaging
Problem Type: Installation
User Type: Developer
Project Phase: Implement
Product Version:
Operating System:
Other Software:

Last Modified Date: 12/10/2019 12:19 AM ID: 609755
People who viewed this also viewed


Did this KB document help you?

What can we do to improve this information (2000 or fewer characters)