Skip to content
This repository has been archived by the owner on Nov 14, 2022. It is now read-only.

Rabbitmq support #51

Merged
merged 9 commits into from
Nov 6, 2021
Merged

Rabbitmq support #51

merged 9 commits into from
Nov 6, 2021

Conversation

sstoychev
Copy link
Contributor

Added RabbitMQ output with the relevant configuration.
pika added as an option as this is the package described in RabbitMQ's tutorial

@dmachard
Copy link
Owner

dmachard commented Nov 5, 2021

Thank for this PR. Could you check why all test results are failed ? something about the "pika" module.

Traceback (most recent call last):\n File "<string>", line 1, in <module>\n File "/home/runner/work/dnstap-receiver/dnstap-receiver/dnstap_receiver/__init__.py", line 1, in <module>\n from dnstap_receiver.receiver import start_receiver\n File "/home/runner/work/dnstap-receiver/dnstap-receiver/dnstap_receiver/receiver.py", line 32, in <module>\n from dnstap_receiver.outputs import output_rabbitmq\n File "/home/runner/work/dnstap-receiver/dnstap-receiver/dnstap_receiver/outputs/output_rabbitmq.py", line 6, in <module>\n from pika.adapters.blocking_connection import BlockingChannel\nModuleNotFoundError: No module named \'pika\'\n'

@sstoychev
Copy link
Contributor Author

sstoychev commented Nov 6, 2021

My bad.
I fixed the issue and verified it by building a wheel and importing in Python docker in order to be sure the environment is missing pika :)

build_wheel.sh:

#!/bin/bash
TAG=`git describe --tags --abbrev=0`
COMMIT=`git log -n1 --format=format:"%h"`
SETUP_PY=`sed "s/{{ version }}/$TAG-$COMMIT+PV/g" setup.j2`

python3 -c "$SETUP_PY" bdist_wheel

docker_test.sh

#!/bin/bash
TAG=`git describe --tags --abbrev=0`
COMMIT=`git log -n1 --format=format:"%h"`

docker run \
    -ti \
    -v "$PWD"/dist:/dist \
    python \
    python3 -m pip install /dist/dnstap_receiver-${TAG}_${COMMIT}_PV-py3-none-any.whl && python3 -c 'import dnstap_receiver' && echo "SUCCESS"

@dmachard dmachard merged commit b47248d into dmachard:master Nov 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants