Skip to main content

Crate ruststream_gcp_pubsub

Crate ruststream_gcp_pubsub 

Source
Expand description

Google Cloud Pub/Sub broker implementation for RustStream.

Handlers, routers, codecs, and middleware come from the framework; this crate supplies the transport over the official google-cloud-pubsub client.

  • A streaming pull subscription is the framework’s message stream; ack and nack are native per message, and the client extends ack deadlines in the background while a handler runs.
  • Dead-letter topics and delivery-attempt counts are subscription settings, surfaced on received messages, not crate machinery.
  • Ordering keys map onto the partition key; message attributes carry headers directly, so no envelope format is invented.
  • The Pub/Sub emulator is a first-class target (PubSubBroker::emulator) for local development and tests.

Structs§

ConnectedPubSubBroker
The typed witness that connect succeeded: holds the live clients directly.
PubSubBroker
A Google Cloud Pub/Sub broker for the RustStream messaging framework.
PubSubMessage
A message delivered by a PubSubSubscriber.
PubSubPublish
The publish policy for PubSubPublisher: pure declaration, constructible anywhere, paired with the connected broker by the runtime after connect.
PubSubPublisher
Publishes messages to Pub/Sub topics, one client publisher per topic, created lazily and shared through the broker core (so shutdown can flush buffered batches).
PubSubSubscriber
A subscription to one Pub/Sub subscription; yields PubSubMessages.
PubSubSubscription
A subscription descriptor for one Pub/Sub subscription.

Enums§

PubSubError
Errors returned by the Google Cloud Pub/Sub broker.

Constants§

DELIVERY_ATTEMPT_HEADER
Header exposing the delivery attempt count on received messages, present when the subscription has a dead-letter policy.
PARTITION_KEY_HEADER
Header carrying the partition key, mapped onto the message’s ordering key.