Mqfilter is built if possible
The mqfilter was not built by default even though it should have been. This has been fixed but the filter is built only if librabbitmq is found. This was done to avoid having the librabbitmq and its development headers as a hard dependency.
This commit is contained in:
@ -160,77 +160,7 @@ Delivery 1, exchange foo routingkey k1
|
||||
Content-type: text/plain
|
||||
```
|
||||
|
||||
## Step 4 - MaxScale integration with librabbitmq-c
|
||||
|
||||
A new filter (mqfilter.c) is implemented in order to send messages to the rabbitmq server and a message consumer (rabbitmq_consumer/consumer.c) program will get messages and store them into a MySQL/MariaDB database.
|
||||
A quick way to install MaxScale with the RabbitMQ filter is to go to the MaxScale source directory and run the following commands:
|
||||
|
||||
```
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DBUILD_RABBITMQ=Y
|
||||
make
|
||||
make install
|
||||
```
|
||||
|
||||
To build the RabbitMQ filter CMake needs an additional parameter:
|
||||
|
||||
```
|
||||
-DBUILD_RABBITMQ=Y
|
||||
```
|
||||
|
||||
If the librabbitmq-c library is manually compiled it may be necessary to manually pass the location of the libraries and header files to CMake.
|
||||
|
||||
Libraries:
|
||||
|
||||
```
|
||||
-DRABBITMQ_LIBRARIES=<path to RabbitMQ-c libraries>
|
||||
```
|
||||
|
||||
Headers:
|
||||
|
||||
```
|
||||
-DRABBITMQ_HEADERS=<path to RabbitMQ-c headers>
|
||||
```
|
||||
|
||||
Please note, Message Queue Consumer (consumer.c) also needs to be compiled with MySQL/MariaDB client libraries in addition to the RabbitMQ-c libraries. If you have your MySQL/MariaDB client libraries and headers in non-standard locations, you can pass them manually to CMake:
|
||||
|
||||
Libraries:
|
||||
|
||||
```
|
||||
-DMYSQLCLIENT_LIBRARIES=<path to libraries>
|
||||
```
|
||||
|
||||
Headers:
|
||||
|
||||
```
|
||||
-DMYSQLCLIENT_HEADERS=<path to headers>
|
||||
```
|
||||
|
||||
The message queue consumer must be also built as a separate task, it’s not built as part of MaxScale build system. To build it, run the following commands in the rabbitmq_consumer directory in the MaxScale source folder:
|
||||
|
||||
```
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ..
|
||||
make
|
||||
```
|
||||
|
||||
To install it:
|
||||
|
||||
```
|
||||
make install
|
||||
```
|
||||
|
||||
To build packages:
|
||||
|
||||
```
|
||||
make package
|
||||
```
|
||||
|
||||
This generates RPM or DEB packages based on your system. These packages can then be installed on remote systems for easy access to the data generated by the consumer client.
|
||||
|
||||
## Step 5 - Configure new applications
|
||||
## Step 4 - Configure new applications
|
||||
|
||||
The new filter needs to be configured in maxscale.cnf.
|
||||
|
||||
|
Reference in New Issue
Block a user