bloomberg / blazingmq

A modern high-performance open source message queuing system
https://bloomberg.github.io/blazingmq/
Apache License 2.0
2.56k stars 139 forks source link

Integration of BlazingMQ with ClickHouse #432

Open SteveBalayanAKAMedian opened 1 month ago

SteveBalayanAKAMedian commented 1 month ago

Hello!

I'm currently working on integration of BlazingMQ into ClickHouse (like RabbitMQ) and have issues with building BMQ as a submodule for ClickHouse. My current work is here.

BMQ has a bit tricky building chain while ClickHouse submodules are added with a pretty straightforward CMakeLists. What I did:

  1. I added BMQ and its dependencies (BDE and ntf-core) as submodules for ClickHouse.
  2. As far as I understand, BDE can be build with plain cmake, so I wrote external CMakeLists.txt for BDE, ntf-core and BMQ to build and link them to ClickHouse.
  3. I didn't understand how to properly add include directories with BDE and BMQ headers, so I added entire source (like target_include_directories(_bal SYSTEM PUBLIC "${BDE_LIBRARY_DIR}/groups/bal/**/*.h")).
  4. Build fails with this. Basically, there are two types of errors: error: "filename" file not found (yet it does exist) and error: "filename" file not found with <angled> include; use "quotes" instead.

How can I fix this and build bmq properly?

hallfox commented 1 month ago

Hi there! Thanks for taking your time to try this out. Unfortunately, I do not believe BDE will build so easily with plain CMake, but I recommend that you try to basically recreate this part of its top level CMakeLists:

https://github.com/bloomberg/bde/blob/62dc695f84d3ee1964d63bd84caf2f9fae5225e2/CMakeLists.txt#L6-L12

If you can somehow provide the CMake helper module it uses in this project's build dependencies, that will probably help a lot. Another thing that might be worth looking at is its vcpkg build rules for the options its particularly looking for.

Good luck!