{"id":13470195,"url":"https://github.com/alanxz/rabbitmq-c","last_synced_at":"2025-10-07T03:31:16.921Z","repository":{"id":38360187,"uuid":"1855590","full_name":"alanxz/rabbitmq-c","owner":"alanxz","description":"RabbitMQ C client","archived":false,"fork":true,"pushed_at":"2024-10-17T12:09:27.000Z","size":3272,"stargazers_count":1767,"open_issues_count":110,"forks_count":671,"subscribers_count":122,"default_branch":"master","last_synced_at":"2024-10-19T16:19:42.072Z","etag":null,"topics":["rabbitmq","rabbitmq-client"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"rabbitmq/rabbitmq-c","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alanxz.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2011-06-06T16:42:17.000Z","updated_at":"2024-10-17T12:09:33.000Z","dependencies_parsed_at":"2023-10-02T18:04:20.231Z","dependency_job_id":null,"html_url":"https://github.com/alanxz/rabbitmq-c","commit_stats":{"total_commits":927,"total_committers":102,"mean_commits":9.088235294117647,"dds":"0.49190938511326865","last_synced_commit":"72e6c63ae07ca800394d38bfe5c9238c9881f0b2"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanxz%2Frabbitmq-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanxz%2Frabbitmq-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanxz%2Frabbitmq-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alanxz%2Frabbitmq-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alanxz","download_url":"https://codeload.github.com/alanxz/rabbitmq-c/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235213926,"owners_count":18953838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rabbitmq","rabbitmq-client"],"created_at":"2024-07-31T16:00:25.002Z","updated_at":"2025-10-07T03:31:11.562Z","avatar_url":"https://github.com/alanxz.png","language":"C","funding_links":[],"categories":["C","Utilities","公用事业","Utilities ##"],"sub_categories":["YAML","Vim ###"],"readme":"# RabbitMQ C AMQP client library\n\n![Build Status](https://github.com/alanxz/rabbitmq-c/actions/workflows/ci.yml/badge.svg)\n\n[![Coverage Status](https://coveralls.io/repos/github/alanxz/rabbitmq-c/badge.svg?branch=master)](https://coveralls.io/github/alanxz/rabbitmq-c?branch=master)\n\n[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/rabbitmq-c.svg)](https://oss-fuzz-build-logs.storage.googleapis.com/index.html#rabbitmq-c)\n\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/7001/badge)](https://www.bestpractices.dev/projects/7001)\n\n## Introduction\n\nThis is a C-language AMQP client library for use with v2.0+ of the\n[RabbitMQ](http://www.rabbitmq.com/) broker.\n\n - \u003chttp://github.com/alanxz/rabbitmq-c\u003e\n\nAnnouncements regarding the library are periodically made on the\nrabbitmq-c-users and cross-posted to rabbitmq-users.\n\n - \u003chttps://groups.google.com/forum/#!forum/rabbitmq-c-users\u003e\n - \u003chttps://groups.google.com/forum/#!forum/rabbitmq-users\u003e\n\n## Latest Stable Version\n\nThe latest stable release of rabbitmq-c can be found at:\n\n - \u003chttps://github.com/alanxz/rabbitmq-c/releases/latest\u003e\n\n## Documentation\n\nAPI documentation for v0.8.0+ can viewed from:\n\n\u003chttp://alanxz.github.io/rabbitmq-c/docs/0.8.0/\u003e\n\n## Getting started\n\n### Building and installing\n\n#### Prereqs:\n- [CMake v3.22 or better](http://www.cmake.org/)\n- A C compiler (GCC 4.4+, clang, and MSVC are test. Other compilers may also\n  work)\n- *Optionally* [OpenSSL](http://www.openssl.org/) v1.1.1+ to enable support for\n  connecting to RabbitMQ over SSL/TLS\n- *Optionally* [POpt](http://freecode.com/projects/popt) to build some handy\n  command-line tools.\n- *Optionally* [XmlTo](https://fedorahosted.org/xmlto/) to build man pages for\n  the handy command-line tools\n- *Optionally* [Doxygen](http://www.stack.nl/~dimitri/doxygen/) to build\n  developer API documentation.\n\nAfter downloading and extracting the source from a tarball to a directory\n([see above](#latest-stable-version)), the commands to build rabbitmq-c on most\nsystems are:\n\n    mkdir build \u0026\u0026 cd build\n    cmake ..\n    cmake --build . [--config Release]\n\nThe --config Release flag should be used in multi-configuration generators e.g.,\nVisual Studio or XCode.\n\nIt is also possible to point the CMake GUI tool at the CMakeLists.txt in the root of\nthe source tree and generate build projects or IDE workspace\n\nInstalling the library and optionally specifying a prefix can be done with:\n\n    cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..\n    cmake --build . [--config Release] --target install\n\nMore information on CMake can be found on its FAQ (http://www.cmake.org/Wiki/CMake_FAQ)\n\nOther interesting flags that can be passed to CMake:\n\n* `BUILD_EXAMPLES=ON/OFF` toggles building the examples. OFF by default.\n* `BUILD_SHARED_LIBS=ON/OFF` toggles building rabbitmq-c as a shared library.\n   ON by default.\n* `BUILD_STATIC_LIBS=ON/OFF` toggles building rabbitmq-c as a static library.\n   ON by default.\n* `BUILD_TESTING=ON/OFF` toggles building test code. ON by default.\n* `BUILD_TOOLS=ON/OFF` toggles building the command line tools. By default\n   this is ON if the build system can find the POpt header and library.\n* `BUILD_TOOLS_DOCS=ON/OFF` toggles building the man pages for the command line\n   tools. By default this is ON if BUILD_TOOLS is ON and the build system can\n   find the XmlTo utility.\n* `ENABLE_SSL_SUPPORT=ON/OFF` toggles building rabbitmq-c with SSL support. By\n   default this is ON if the OpenSSL headers and library can be found.\n* `BUILD_API_DOCS=ON/OFF` - toggles building the Doxygen API documentation, by\n   default this is OFF\n* `RUN_SYSTEM_TESTS=ON/OFF` toggles building the system tests (i.e. tests requiring \n   an accessible RabbitMQ server instance on localhost), by default this is OFF\n\n## Building RabbitMQ - Using vcpkg\n\nYou can download and install RabbitMQ using the [vcpkg](https://github.com/Microsoft/vcpkg) \ndependency manager:\n\n    git clone https://github.com/Microsoft/vcpkg.git\n    cd vcpkg\n    ./bootstrap-vcpkg.sh\n    ./vcpkg integrate install\n    ./vcpkg install librabbitmq\n\nThe RabbitMQ port in vcpkg is kept up to date by Microsoft team members and \ncommunity contributors. If the version is out of date, \nplease [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.\n\n## Running the examples\n\nArrange for a RabbitMQ or other AMQP server to be running on\n`localhost` at TCP port number 5672.\n\nIn one terminal, run\n\n    ./examples/amqp_listen localhost 5672 amq.direct test\n\nIn another terminal,\n\n    ./examples/amqp_sendstring localhost 5672 amq.direct test \"hello world\"\n\nYou should see output similar to the following in the listener's\nterminal window:\n\n    Delivery 1, exchange amq.direct routingkey test\n    Content-type: text/plain\n    ----\n    00000000: 68 65 6C 6C 6F 20 77 6F : 72 6C 64                 hello world\n    0000000B:\n\n## Writing applications using `librabbitmq`\n\nPlease see the `examples` directory for short examples of the use of\nthe `librabbitmq` library.\n\n### Threading\n\nYou cannot share a socket, an `amqp_connection_state_t`, or a channel\nbetween threads using `librabbitmq`. The `librabbitmq` library is\nbuilt with event-driven, single-threaded applications in mind, and\ndoes not yet cater to any of the requirements of `pthread`ed\napplications.\n\nYour applications instead should open an AMQP connection (and an\nassociated socket, of course) per thread. If your program needs to\naccess an AMQP connection or any of its channels from more than one\nthread, it is entirely responsible for designing and implementing an\nappropriate locking scheme. It will generally be much simpler to have\na connection exclusive to each thread that needs AMQP service.\n\n### License \u0026 Copyright\n\nPortions created by Alan Antonuk are Copyright (c) 2012-2021\nAlan Antonuk. All Rights Reserved.\n\nPortions created by VMware are Copyright (c) 2007-2012 VMware, Inc.\nAll Rights Reserved.\n\nPortions created by Tony Garnock-Jones are Copyright (c) 2009-2010\nVMware, Inc. and Tony Garnock-Jones. All Rights Reserved.\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use, copy,\nmodify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\nBE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\nACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falanxz%2Frabbitmq-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falanxz%2Frabbitmq-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falanxz%2Frabbitmq-c/lists"}