UM C API  6.16

Informatica

Ultra Messaging (Version 6.16)



Ultra Messaging C API



Introduction

This document provides detailed reference information for the UM C API.

For policies and procedures related to Ultra Messaging Technical Support, see UM Support.

(C) Copyright 2004,2023 Informatica Inc. All Rights Reserved.

This software and documentation are provided only under a separate license agreement containing restrictions on use and disclosure. No part of this document may be reproduced or transmitted in any form, by any means (electronic, photocopying, recording or otherwise) without prior consent of Informatica LLC.

A current list of Informatica trademarks is available on the web at https://www.informatica.com/trademarks.html.

Portions of this software and/or documentation are subject to copyright held by third parties. Required third party notices are included with the product.

This software is protected by patents as detailed at https://www.informatica.com/legal/patents.html.

The information in this documentation is subject to change without notice. If you find any problems in this documentation, please report them to us in writing at Informatica LLC 2100 Seaport Blvd. Redwood City, CA 94063.

Informatica products are warranted according to the terms and conditions of the agreements under which they are provided.
INFORMATICA LLC PROVIDES THE INFORMATION IN THIS DOCUMENT "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING WITHOUT ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ANY WARRANTY OR CONDITION OF NON-INFRINGEMENT.


UM C API

To use the UM C API, you must access the UM headers (".h" files), and native libraries (dynamic or static). Note that these files are platform dependent and are contained in the platform-specific packages.

For details on how data structures are used in UM, see C Structure Usage Patterns.

Note that unlike C++, standard C does not support function overloading in which the same function name can have different numbers of parameters. It is fairly common for a C API function to have parameters that the user does not desire to use. For example, the timer scheduling function prototype is:

The "evq" parameter is for an Event Queue Object, which is considered optional. Meaning that the user can design his application to either use or not use an event queue, depending on the application requirements. If the user chooses not to use an event queue, the timer schedule call should pass NULL as the evq:

err = lbm_schedule_timer(ctx, my_timer_funct, NULL, NULL, 10);

(In this example, the "clientd" parameter is also not used.)


Using UM C on Windows

To run C applications on Windows, the OS needs to be able to find the native UM library, "lbm.dll". A typical way to accomplish this is to include the "bin" folder in the system PATH. For example:

C:\Program Files\Informatica\UMS_6.12.1\Win2k-x86_64\bin

(Replace "UMS_6.12.1" with your UM version.)

WSAStartup()

The application needs to call WSAStartup() prior to the first UM call. See Example minsrc.c.


Using UM C on Unix

To run C applications on Unix, the OS needs to be able to find the native UM library, "liblbm.so". A typical way to accomplish this is to set the environment variable "LD_LIBRARY_PATH" to point at the UM library directory. For example:

LD_LIBRARY_PATH=/um_home/UMS_6.12.1/Linux-glibc-2.17-x86_64/lib
export LD_LIBRARY_PATH

(Replace "/um_home/UMS_6.12.1/Linux-glibc-2.17-x86_64" with the path where your version of UM is installed.) In there you will find the UM native libraries.