Skip to content

Commit

Permalink
add support for GCP PubSub
Browse files Browse the repository at this point in the history
Largely this is a port of code written for `svix-bridge` in the
`generic-queue` crate.

Adds tests modeled after the rest of the backends here, but with
GCP-specific setup and configuration.

Scheduled delivery is still TODO.
  • Loading branch information
svix-onelson committed Aug 10, 2023
1 parent 1a6d143 commit b70fb88
Show file tree
Hide file tree
Showing 5 changed files with 538 additions and 1 deletion.
13 changes: 12 additions & 1 deletion omniqueue/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,18 @@ aws-sdk-sqs = { version = "0.25", optional = true }
bb8 = { version = "0.8", optional = true }
bb8-redis = { version = "0.13", optional = true }
futures = { version = "0.3", default-features = false, features = ["async-await", "std"] }
futures-util = { version = "0.3.28", optional = true }
google-cloud-default = { version = "0.4.0", features = ["pubsub"], optional = true }
google-cloud-googleapis = { version = "0.10.0", optional = true }
google-cloud-pubsub = { version = "0.18.0", optional = true }
lapin = { version = "2", optional = true }
rdkafka = { version = "0.29", features = ["cmake-build", "ssl", "tracing"] }
redis = { version = "0.23", features = ["tokio-comp", "tokio-native-tls-comp", "streams"], optional = true }
serde = { version = "1", features = ["derive", "rc"] }
serde_json = "1"
thiserror = "1"
tokio = { version = "1", features = ["full"] }
tokio-util = { version = "0.7", optional = true }
tracing = "0.1"

[dev-dependencies]
Expand All @@ -31,7 +36,13 @@ tokio-executor-trait = "2.1"
tokio-reactor-trait = "1.1"

[features]
default = ["memory_queue", "rabbitmq", "redis", "redis_cluster", "sqs"]
default = ["memory_queue", "gcp_pubsub", "rabbitmq", "redis", "redis_cluster", "sqs"]
gcp_pubsub = [
"dep:futures-util",
"dep:google-cloud-googleapis",
"dep:google-cloud-pubsub",
"dep:tokio-util",
]
memory_queue = []
rabbitmq = ["dep:lapin"]
redis = ["dep:bb8", "dep:bb8-redis", "dep:redis"]
Expand Down
Loading

0 comments on commit b70fb88

Please sign in to comment.