Coder Social home page Coder Social logo

bxrabbitmq's Introduction

bxrabbitmq

RabbitMQ client & server administration (C++ library)

The bxrabbitmq library (also BxRabbitMQ or Bayeux/RabbitMQ) consists in a C++ API for RabbitMQ server administration and Rabbit clients.

This is a very preliminary work that needs more development and tests.

bxrabbitmq has been initiated in the framework of the SuperNEMO physics experiment software.

Versions

Current version: 1.0.0 (2021-02-03)

Dependencies and inspiration

bxrabbitmq makes use or is based on:

bxrabbitmq depends on:

  • The RabbitMQ-C client library (https://github.com/alanxz/rabbitmq-c)

    • On Ubuntu 18.04 : librabbitmq 0.8.0
    • On Ubuntu 20.04 : librabbitmq 0.10.0
    $ sudo apt-get install librabbitmq-dev
    
  • Boost (version >=1.65, but former version may work)

    • On Ubuntu 18.04 : Boost 1.65.1
    • On Ubuntu 20.04 : Boost 1.71.0
    $ sudo apt-get install libboost-all-dev
    
  • cURLpp (https://github.com/jpbarrette/curlpp) for optional server management code

    • On Ubuntu 18.04 : libcurl 7.58.0
    • On Ubuntu 20.04 : libcurl 7.68.0
    $ sudo apt-get install libcurl4-openssl-dev libcurl4
    $ sudo apt-get install libcurlpp-dev
    
  • BxJsontools (https://github.com/BxCppDev/bxjsontools) for optional server management code

  • CMake and pkgconfig for build and install

    • On Ubuntu 18.04 : CMake 3.10.2, pkg-config 0.29.1
    • On Ubuntu 20.04 : CMake 3.16.3, pkg-config 0.29.1
    $ sudo apt-get install cmake pkg-config
    

License:

See the LICENSE.txt file and the licensing directory.

Build and install:

CMake options:

  • BXRABBITMQ_WITH_MANAGER for building RabbitMQ management code (default=OFF). This implies cURLpp and BxJsontools (see above).

Prerequisites:

  • update PKG_CONFIG_PATH to RabbitMQ-C client library pkgconfig description librabbitmq.pc:
$ export PKG_CONFIG_PATH=/path/to/rabbitc/install/dir/lib/../pkgconfig:${PKG_CONFIG_PATH}
  • update PATH to bxjsontools-query (only for client management code):
$ export PATH=/path/to/bxjsontools/install/dir/bin:${PATH}
  • update PKG_CONFIG_PATH to cURLpp library pkgconfig description curlpp.pc (only for client management code):
$ export PKG_CONFIG_PATH=/path/to/curlpp/install/dir/lib/../pkgconfig:${PKG_CONFIG_PATH}
  • make sure Boost is installed on your system and CMake has a proper FindBoost module:
$ cmake --help-module FindBoost

Note:

  • 2017-09-26: (OBSOLETE 2020-02-03) : Linuxbrew formula for rabbitmq-c is available from Linuxbrew core tap. Formulas for bxjsontools and bxrabbitmq are available from the https://github.com/BxCppDev/homebrew-bxtap.

Download the source code from GitHub:

  • Download the source code from the default develop branch:
$ mkdir -p ${HOME}/bxrabbitmq/_source.d/
$ cd       ${HOME}/bxrabbitmq/_source.d/
$ git clone https://github.com/BxCppDev/bxrabbitmq.git bxrabbitmq

or, for a specific tag:

$ git clone -b '0.4.2' --single-branch https://github.com/BxCppDev/bxrabbitmq.git bxrabbitmq-0.4.2
  • Configure, build, install:
$ mkdir -p ${HOME}/bxrabbitmq/_build.d/
$ cd       ${HOME}/bxrabbitmq/_build.d/
$ cmake -DCMAKE_INSTALL_PREFIX=../_install.d ../_source.d/bxrabbitmq[-0.4.2]
$ make
$ make test
$ make install

Supported options and configuration parameters:

  • BXRABBITMQ_WITH_MANAGER : flag to build the RabbitMQ server management API (implies curlpp and bxjsontools, default: OFF),
  • BOOST_ROOT : path to your installation of Boost libraries.

Example:

$ mkdir -p ${HOME}/bxrabbitmq/_build.d/
$ cd       ${HOME}/bxrabbitmq/_build.d/
$ cmake \
    -DCMAKE_INSTALL_PREFIX=../_install.d \
    -DBXRABBITMQ_WITH_MANAGER=ON \
    -DBxJsontools_DIR=$(bxjsontools-query --cmakedir) \
    ../_source.d/bxrabbitmq[-0.4.2]
$ make
$ make test
$ make install

Quickstart build tools:

$ ./tools/build.sh --mgr --boost-prefix $(brew --prefix boost)

Using bxrabbitmq:

  • The bxrabbitmq-query utility allows you to fetch informations about your BxRabbitMQ installation. You may add the following typical line in your ~/.bashrc profile:
export PATH="${HOME}/bxrabbitmq/_install.d/bin:${PATH}"

This will give you access to the bxrabbitmq-query command-line utility:

$ bxrabbitmq-query --help
$ cat $(bxrabbitmq-query --prefix)/share/BxRabbitMQ-$(bxrabbitmq-query --version)/examples/tutorials/README.md
  • CMake configuration scripts (i.e. BxRabbitMQConfig.cmake and BxRabbitMQConfigVersion.cmake) are provided for client software. The CMake find_package(BxRabbitmq REQUIRED CONFIG) command can be given the following variable to find the BxRabbitMQ installation on your system:
$ cmake ... -DBxRabbitMQ_DIR="$(bxrabbitmq-query --cmakedir)" ...

bxrabbitmq's People

Contributors

fmauger avatar jhommet avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

laeeth wcfylcf

bxrabbitmq's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.