Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Cpp11BracedListStyle: true
DerivePointerAlignment: false
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
ForEachMacros: [ foreach, Q_FOREACH ]
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: true
MacroBlockBegin: ''
Expand Down
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ endif()

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "SunPro")
# _RWSTD_ALLOCATOR tells the solaris <memory> header to define a std::allocator
# which conforms better to the C++ standard, which is expected by Boost. Without
# this, the library does not build due to missing std::allocator<..>::rebind
# which conforms better to the C++ standard; without this, the library does not
# build due to missing std::allocator<..>::rebind

# "-D_XOPEN_SOURCE=500" "-D__EXTENSIONS__" tells the solaris sys/socket.h to conform
# better to what boost asio expects (to have a msg_flags member)
# better to what Asio expects (to have a msg_flags member)
target_compile_definitions(rmq PRIVATE _RWSTD_ALLOCATOR "-D_XOPEN_SOURCE=500" "-D__EXTENSIONS__")

# Solaris doesn't pull these symbols in automatically
Expand All @@ -28,8 +28,8 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "SunPro")

set(PKG_LIBS "-lnsl -lsocket")
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "XL")
# The ibm/xl compiler does not appreciate this boost feature
target_compile_definitions(rmq PRIVATE BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS)
# The ibm/xl compiler does not appreciate this Asio feature
target_compile_definitions(rmq PRIVATE ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS)
else()
# In general the sunpro/xl warnings are not worth the bother
set(CMAKE_COMPILE_WARNING_AS_ERROR ON)
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,11 @@ graph TD;
[rmqtestmocks](src/rmqtestmocks) | gmock types | Objects useful for testing applications using `rmqcpp`
[rmqamqp](src/rmq/rmqamqp) | AMQP abstraction layer | All logic relating to amqp communication, framing, classes and state machines - connection, channel queue
[rmqamqpt](src/rmq/rmqamqpt) | Low-level AMQP data types (from 0-9-1 spec) | Primitives of the AMQP standard, methods, frame, amqp types to C++ types mapping
[rmqio](src/rmq/rmqio) | IO abstraction layer | Raw socket connections management, reads/writes AMQP frames from/to the wire. Contains a set of async io interfaces, and an implementation using `boost::asio`
[rmqio](src/rmq/rmqio) | IO abstraction layer | Raw socket connections management, reads/writes AMQP frames from/to the wire. Contains a set of async io interfaces, and an implementation using `asio`

## Quick Start
The quickest way to get started is to take a look at our integration tests and sample 'hello world' program, which is possible by following the Docker [Build](#building) steps and then: from the interactive shell window running `./build/examples/helloworld/rmqhelloworld_producer`


## Usage

```cpp
Expand Down
4 changes: 2 additions & 2 deletions dockerfiles/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ RUN apt-get update && apt-get install -y \
clang-format \
cmake \
curl \
gcc \
gcc \
gdb \
git \
libboost-dev \
libasio-dev \
libssl-dev \
net-tools \
netcat-traditional \
Expand Down
23 changes: 0 additions & 23 deletions licenses-binary/LICENSE-boost-asio.txt

This file was deleted.

23 changes: 0 additions & 23 deletions licenses-binary/LICENSE-boost-iostreams.txt

This file was deleted.

23 changes: 0 additions & 23 deletions licenses/LICENSE-boost-asio.txt

This file was deleted.

23 changes: 0 additions & 23 deletions licenses/LICENSE-boost-iostreams.txt

This file was deleted.

2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
find_package(Threads REQUIRED) # CMake 3.26-rc3 Bug https://gitlab.kitware.com/cmake/cmake/-/issues/24505
find_package(ZLIB REQUIRED)
find_package(Boost REQUIRED)
set(OPENSSL_USE_STATIC_LIBS TRUE)
find_package(OpenSSL REQUIRED)
find_package(GTest REQUIRED)
find_package(asio CONFIG REQUIRED)

# BDE-required subpackages
find_package(bal REQUIRED)
Expand Down
6 changes: 3 additions & 3 deletions src/rmq/rmqa/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ target_link_libraries(rmqa PUBLIC
)
if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "SunPro" )
# _RWSTD_ALLOCATOR tells the solaris <memory> header to define a std::allocator
# which conforms better to the C++ standard, which is expected by Boost. Without
# this, the library does not build due to missing std::allocator<..>::rebind
# which conforms better to the C++ standard; without this, the library does not
# build due to missing std::allocator<..>::rebind

# "-D_XOPEN_SOURCE=500" "-D__EXTENSIONS__" tells the solaris sys/socket.h to conform
# better to what boost asio expects (to have a msg_flags member)
# better to what Asio expects (to have a msg_flags member)
target_compile_definitions(rmqa PRIVATE _RWSTD_ALLOCATOR "-D_XOPEN_SOURCE=500" "-D__EXTENSIONS__")
endif()

Expand Down
12 changes: 7 additions & 5 deletions src/rmq/rmqa/rmqa_rabbitcontextimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@
#include <bsls_review.h>
#include <bsls_timeinterval.h>

#include <boost/algorithm/string/join.hpp>

#include <bsl_sstream.h>
#include <bsl_string.h>
#include <bsl_vector.h>
Expand Down Expand Up @@ -247,9 +245,13 @@ RabbitContextImpl::~RabbitContextImpl()
<< it->second.size() << " producers/consumers";

if (it->second.size() > 0) {
bsl::string channelsDebugInfo =
boost::algorithm::join(it->second, ", ");

std::string channelsDebugInfo;
for (size_t i = 0; i < it->second.size(); ++i) {
if (i > 0) {
channelsDebugInfo += ", ";
}
channelsDebugInfo += it->second.at(i);
}
logOutput << ": [" << channelsDebugInfo << "]. ";
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/rmq/rmqa/rmqa_rabbitcontextoptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class RabbitContextOptions {
RabbitContextOptions& useRabbitMQFieldValueEncoding(bool rabbitEncoding);

/// \brief Shuffle endpoints rmq connects to.
/// By default, boost asio (libc) resolves and connects
/// By default, Asio (libc) resolves and connects
/// to the node with longest matching subnet prefix
/// causing disproportionately more connections with certain endpoints.
/// Setting this option will shuffle resolver results.
Expand Down
6 changes: 3 additions & 3 deletions src/rmq/rmqamqp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ target_link_libraries(rmqamqp PUBLIC

if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "SunPro" )
# _RWSTD_ALLOCATOR tells the solaris <memory> header to define a std::allocator
# which conforms better to the C++ standard, which is expected by Boost. Without
# this, the library does not build due to missing std::allocator<..>::rebind
# which conforms better to the C++ standard; without this, the library does not
# build due to missing std::allocator<..>::rebind

# "-D_XOPEN_SOURCE=500" "-D__EXTENSIONS__" tells the solaris sys/socket.h to conform
# better to what boost asio expects (to have a msg_flags member)
# better to what Asio expects (to have a msg_flags member)
target_compile_definitions(rmqamqp PRIVATE _RWSTD_ALLOCATOR "-D_XOPEN_SOURCE=500" "-D__EXTENSIONS__")
endif()
target_include_directories(rmqamqp PUBLIC .)
10 changes: 5 additions & 5 deletions src/rmq/rmqio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@ target_link_libraries(rmqio PUBLIC
bal
rmqamqpt
rmqt
Boost::boost
asio::asio
)

if( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "SunPro" )
# _RWSTD_ALLOCATOR tells the solaris <memory> header to define a std::allocator
# which conforms better to the C++ standard, which is expected by Boost. Without
# this, the library does not build due to missing std::allocator<..>::rebind
# which conforms better to the C++ standard; without this, the library does not
# build due to missing std::allocator<..>::rebind

# "-D_XOPEN_SOURCE=500" "-D__EXTENSIONS__" tells the solaris sys/socket.h to conform
# better to what boost asio expects (to have a msg_flags member)
# better to what Asio expects (to have a msg_flags member)
target_compile_definitions(rmqio PRIVATE _RWSTD_ALLOCATOR "-D_XOPEN_SOURCE=500" "-D__EXTENSIONS__")

target_link_options(rmqio PUBLIC -lnsl -lsocket)
endif()

if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "XL")
target_compile_definitions(rmqio PRIVATE BOOST_ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS)
target_compile_definitions(rmqio PRIVATE ASIO_DISABLE_HANDLER_TYPE_REQUIREMENTS)
endif()
target_include_directories(rmqio PUBLIC .)
Loading
Loading