Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sources): New amqp (Rabbitmq) Source/Sink #7120

Merged
merged 62 commits into from
Sep 20, 2022
Merged
Show file tree
Hide file tree
Changes from 59 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
70cd803
Amqp
dbcfd Mar 9, 2021
ae0d0e0
Merge remote-tracking branch 'origin' into rabbitmq
StephenWakely Mar 2, 2022
d3085a5
Changes following merge with master.
StephenWakely Mar 2, 2022
6e86a14
Merge remote-tracking branch 'origin' into rabbitmq.new
StephenWakely Mar 14, 2022
04ad9cf
Fixes following merge with master.
StephenWakely Mar 14, 2022
34bc807
Moved docs to website.
StephenWakely Mar 14, 2022
a000c5c
Apply feedback.
StephenWakely Mar 14, 2022
d6a25c2
cue fmt
StephenWakely Mar 14, 2022
ce7f43b
Cue errors.
StephenWakely Mar 14, 2022
0224faf
Merge remote-tracking branch 'origin' into rabbitmq
StephenWakely Aug 3, 2022
2a3e8f8
Update to master
StephenWakely Aug 8, 2022
7178098
Update integration tests.
StephenWakely Aug 10, 2022
77c57d5
Clippy
StephenWakely Aug 10, 2022
f7cbbbb
Udpate to stream sink.
StephenWakely Aug 16, 2022
4670d3c
Update lapin.
StephenWakely Aug 16, 2022
b6216ed
Feedback from Spencer.
StephenWakely Aug 16, 2022
62e44ad
Merge remote-tracking branch 'origin' into rabbitmq
StephenWakely Aug 16, 2022
62abc37
Fixed docs.
StephenWakely Aug 16, 2022
9cb5b8f
Update integration tests to test emitted events.
StephenWakely Aug 16, 2022
a3128a2
Separate into modules.
StephenWakely Aug 17, 2022
87acb59
Add namespacing for source.
StephenWakely Aug 17, 2022
8c232bc
Merge remote-tracking branch 'origin/master' into rabbitmq
StephenWakely Aug 17, 2022
5e8818d
Fixed after master merge.
StephenWakely Aug 17, 2022
6659272
Update sink tests.
StephenWakely Aug 17, 2022
3bc9fbc
Fix docs key defaults.
StephenWakely Aug 17, 2022
b5a367b
Source needs a valid connection to create ok.
StephenWakely Aug 18, 2022
c285d9f
Tidy up code a little.
StephenWakely Aug 18, 2022
0a36c93
Clippy
StephenWakely Aug 18, 2022
437a43f
Remove old integration file
StephenWakely Aug 18, 2022
7fcac85
Update internal events.
StephenWakely Aug 19, 2022
ecd60db
Added e2e acknowledgements.
StephenWakely Aug 23, 2022
563f5bb
Clippy
StephenWakely Aug 23, 2022
192bd9b
Formatting
StephenWakely Aug 23, 2022
f7488ba
More formatting
StephenWakely Aug 23, 2022
6a3fca6
Fixed event errors.
StephenWakely Aug 24, 2022
60c3bc7
Removed nonexisting import.
StephenWakely Aug 24, 2022
83f7895
Merge remote-tracking branch 'origin/master' into rabbitmq
StephenWakely Aug 24, 2022
91718d9
Merge remote-tracking branch 'origin/master' into rabbitmq
StephenWakely Aug 24, 2022
3befe3c
Configurable changes
StephenWakely Aug 30, 2022
7fa47c2
cue fmt
StephenWakely Aug 30, 2022
4010bd5
cue fmt
StephenWakely Aug 30, 2022
02b27df
Fix internal events feature.
StephenWakely Aug 30, 2022
fa0644c
Merge remote-tracking branch 'origin/master' into rabbitmq
StephenWakely Sep 5, 2022
9d1875a
Update sink configurable.
StephenWakely Sep 5, 2022
afc4cc6
Add sink to enum.
StephenWakely Sep 5, 2022
188291a
Responding to feedback from Spencer, Pierre and Kyle.
StephenWakely Sep 7, 2022
0f31936
Merge remote-tracking branch 'origin/master' into rabbitmq
StephenWakely Sep 7, 2022
c1fd0ef
Fixes following merge with master.
StephenWakely Sep 7, 2022
138b012
Further feedback from Spencer and Kyle.
StephenWakely Sep 8, 2022
048a805
Add count to EventsReceived.
StephenWakely Sep 8, 2022
925b1fc
Fix duplicate events CI error
StephenWakely Sep 8, 2022
91b57bd
Rename routing_key to routing_key_field
StephenWakely Sep 8, 2022
1ec1fb7
Fmt
StephenWakely Sep 9, 2022
6df7f92
Updated tests.
StephenWakely Sep 9, 2022
fc45cac
Cue fmt
StephenWakely Sep 9, 2022
c35e1bd
Update routing_key name
StephenWakely Sep 9, 2022
a4e5241
Merge remote-tracking branch 'origin/master' into rabbitmq
StephenWakely Sep 13, 2022
b645a1f
Fix following merge.
StephenWakely Sep 13, 2022
12498de
Use write_all utility fn.
StephenWakely Sep 13, 2022
56bd535
Merge remote-tracking branch 'origin/master' into rabbitmq
StephenWakely Sep 15, 2022
d4423af
Renamed tests.rs to integration_tests.rs
StephenWakely Sep 20, 2022
5f8c535
Remove inventory submit
StephenWakely Sep 20, 2022
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
1 change: 1 addition & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
fail-fast: false
matrix:
include:
- test: 'amqp'
- test: 'apex'
- test: 'aws'
- test: 'axiom'
Expand Down
172 changes: 172 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ prost-types = { version = "0.10.1", default-features = false, optional = true }
goauth = { version = "0.13.1", optional = true }
smpl_jwt = { version = "0.7.1", default-features = false, optional = true }

# AMQP
lapin = { version = "2.1.1", default-features = false, optional = true }

# API
async-graphql = { version = "4.0.13", default-features = false, optional = true, features = ["chrono"] }
async-graphql-warp = { version = "4.0.13", default-features = false, optional = true }
Expand Down Expand Up @@ -441,6 +444,7 @@ enrichment-tables-geoip = ["dep:maxminddb"]
# Sources
sources = ["sources-logs", "sources-metrics"]
sources-logs = [
"sources-amqp",
"sources-aws_kinesis_firehose",
"sources-aws_s3",
"sources-aws_sqs",
Expand Down Expand Up @@ -483,6 +487,7 @@ sources-metrics = [
"sources-vector",
]

sources-amqp = ["lapin"]
sources-apache_metrics = []
sources-aws_ecs_metrics = []
sources-aws_kinesis_firehose = ["dep:base64", "dep:infer"]
Expand Down Expand Up @@ -576,6 +581,7 @@ transforms-throttle = ["dep:governor"]
# Sinks
sinks = ["sinks-logs", "sinks-metrics"]
sinks-logs = [
"sinks-amqp",
"sinks-apex",
"sinks-aws_cloudwatch_logs",
"sinks-aws_kinesis_firehose",
Expand Down Expand Up @@ -630,6 +636,7 @@ sinks-metrics = [
"sinks-splunk_hec"
]

sinks-amqp = ["lapin"]
sinks-apex = []
sinks-aws_cloudwatch_logs = ["aws-core", "dep:aws-sdk-cloudwatchlogs"]
sinks-aws_cloudwatch_metrics = ["aws-core", "dep:aws-sdk-cloudwatch"]
Expand Down Expand Up @@ -692,6 +699,7 @@ nightly = []

# Testing-related features
all-integration-tests = [
"amqp-integration-tests",
"apex-integration-tests",
"aws-integration-tests",
"axiom-integration-tests",
Expand Down Expand Up @@ -727,6 +735,8 @@ all-integration-tests = [
"dnstap-integration-tests",
]

amqp-integration-tests = ["sources-amqp", "sinks-amqp"]

aws-integration-tests = [
"aws-cloudwatch-logs-integration-tests",
"aws-cloudwatch-metrics-integration-tests",
Expand Down Expand Up @@ -876,4 +886,3 @@ name = "codecs"
path = "benches/codecs/main.rs"
harness = false
required-features = ["codecs-benches"]

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ test-enterprise: ## Runs enterprise related behavioral tests

.PHONY: test-integration
test-integration: ## Runs all integration tests
test-integration: test-integration-apex test-integration-aws test-integration-axiom test-integration-azure test-integration-clickhouse test-integration-docker-logs test-integration-elasticsearch
test-integration: test-integration-amqp test-integration-apex test-integration-aws test-integration-axiom test-integration-azure test-integration-clickhouse test-integration-docker-logs test-integration-elasticsearch
test-integration: test-integration-azure test-integration-clickhouse test-integration-docker-logs test-integration-elasticsearch
test-integration: test-integration-eventstoredb test-integration-fluent test-integration-gcp test-integration-humio test-integration-http-scrape test-integration-influxdb
test-integration: test-integration-kafka test-integration-logstash test-integration-loki test-integration-mongodb test-integration-nats
Expand Down
36 changes: 36 additions & 0 deletions scripts/integration/docker-compose.amqp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
version: "3"

services:
rabbitmq:
image: docker.io/rabbitmq:3.8
ports:
- 5672:5672
runner:
build:
context: ${PWD}
dockerfile: scripts/integration/Dockerfile
args:
- RUST_VERSION=${RUST_VERSION}
working_dir: /code
command:
- "cargo"
- "nextest"
- "run"
- "--no-fail-fast"
- "--no-default-features"
- "--features"
- "amqp-integration-tests"
- "--lib"
- "${FILTER:-::amqp::}"
depends_on:
- rabbitmq
volumes:
- ${PWD}:/code
- target:/code/target
- cargogit:/usr/local/cargo/git
- cargoregistry:/usr/local/cargo/registry

volumes:
target: {}
cargogit: {}
cargoregistry: {}
Loading