Skip to main content

ruststream_gcp_pubsub/
lib.rs

1//! Google Cloud Pub/Sub broker implementation for `RustStream`.
2//!
3//! Handlers, routers, codecs, and middleware come from the framework; this crate supplies the
4//! transport over the official
5//! [`google-cloud-pubsub`](https://docs.rs/google-cloud-pubsub) client.
6//!
7//! - A streaming pull subscription is the framework's message stream; ack and nack are native
8//!   per message, and the client extends ack deadlines in the background while a handler runs.
9//! - Dead-letter topics and delivery-attempt counts are subscription settings, surfaced on
10//!   received messages, not crate machinery.
11//! - Ordering keys map onto the partition key; message attributes carry headers directly, so
12//!   no envelope format is invented.
13//! - The Pub/Sub emulator is a first-class target ([`PubSubBroker::emulator`]) for local
14//!   development and tests.
15
16#![forbid(unsafe_code)]
17
18mod broker;
19mod error;
20mod message;
21mod publisher;
22mod subscriber;
23mod subscription;
24#[cfg(feature = "testing")]
25pub mod testing;
26
27pub use broker::{ConnectedPubSubBroker, PubSubBroker};
28pub use error::PubSubError;
29pub use message::{DELIVERY_ATTEMPT_HEADER, PARTITION_KEY_HEADER, PubSubMessage};
30pub use publisher::{PubSubPublish, PubSubPublisher};
31pub use subscriber::PubSubSubscriber;
32pub use subscription::PubSubSubscription;