Skip to content

KasperskyLab/rabbitmq-c-kos

 
 

Repository files navigation

KasperskyOS modification of RabbitMQ-C AMQP client library

This version of the RabbitMQ® C AMQP client library is adapted for KasperskyOS. The project is based on a commit of version 0.13.0 and includes two examples: an AMQP consumer and an AMQP publisher.

The RabbitMQ-C AMQP client library for KasperskyOS provides the ability to send and receive messages between programs using a RabbitMQ message broker as an intermediary. For more information about RabbitMQ, see RabbitMQ.

Communication between the RabbitMQ-C AMQP library and the RabbitMQ message broker is based on an Advanced Message Queuing Protocol (AMQP). For more information about AMQP, see AMQP version 0.9.1.

For more information about KasperskyOS, please refer to the KasperskyOS Community Edition Online Help.

This implementation of RabbitMQ-C AMQP client library only supports AMQP version 0.9.1.

Other limitations and known issues are described in the KasperskyOS Community Edition Online Help.

Table of contents

Getting started

Prerequisites

  1. Install KasperskyOS Community Edition SDK. You can download the latest version of the KasperskyOS Community Edition for free from os.kaspersky.com. The minimum required version of KasperskyOS Community Edition SDK is 1.2. For more information, see System requirements.
  2. Copy project source files to your home directory. Examples of KasperskyOS-based solutions are located in the ./kos directory.

Usage

When you develop a KasperskyOS-based solution, use the recommended structure of project directories to simplify usage of CMake scripts.

To include the RabbitMQ-C AMQP client library in your KasperskyOS-based solution, follow these steps:

  1. Build the library using the CMake module ExternalProject.
  2. Use CMake command target_include_directories() to specify the paths to the header file directories.
  3. Link the built library to your program using CMake command target_link_libraries(). Examples of implementing this approach are shown in the files: ./kos/amqp_consumer/consumer/CMakeLists.txt and ./kos/amqp_publisher/publisher/CMakeLists.txt.
  4. Add the required header files to your code file to enable calls to library functions:
    #include <amqp.h>
    #include <amqp_framing.h>
    #include <amqp_tcp_socket.h>
    ...
    

This solution uses the dynamic variant of the RabbitMQ-C AMQP client library. To build a static variant of the library, use the initialize_platform command with the FORCE_STATIC parameter. For additional details regarding this command, please refer to the platform library.

Examples

  • ./kos/amqp_consumer—Example of developing a solution that is an implementation of the AMQP consumer.
  • ./kos/amqp_publisher—Example of developing a solution that is an implementation of the AMQP publisher.

Tests

./kos/unit_tests—Unit testing using the GoogleTest framework.

Trademarks

Registered trademarks and endpoint marks are the property of their respective owners.

GoogleTest is a trademark of Google LLC.

RabbitMQ® is a trademark of VMware, Inc. in the U.S. and other countries.

Raspberry Pi is a trademark of the Raspberry Pi Foundation.

Contributing

Only KasperskyOS-specific changes can be approved. See CONTRIBUTING.md for detailed instructions on code contribution.

Licensing

This project is licensed under the terms of the MIT license. See LICENSE for more information.

⬆ Back to Top

© 2024 AO Kaspersky Lab

Releases

No releases published

Packages

No packages published

Languages

  • C 80.5%
  • C++ 7.5%
  • CMake 6.8%
  • Python 3.6%
  • Shell 1.6%