pub struct GroupOpts {
pub group_id: String,
pub shard_count: Option<u32>,
pub instance_id: Option<String>,
}Expand description
Options specific to consumer-group subscriptions.
Used with SubscribeOpts::consumer_group. Checkpoints are owned by group_id × shard,
not per-instance subscription names.
Fields§
§group_id: StringStable consumer group identifier (shared across replicas).
shard_count: Option<u32>Override virtual shard count (defaults to topic #[photon::topic(shards = ...)]).
instance_id: Option<String>Fleet member id for lease coordination (static env assignment when unset).
Implementations§
Source§impl GroupOpts
impl GroupOpts
Sourcepub fn new(group_id: impl Into<String>) -> GroupOpts
pub fn new(group_id: impl Into<String>) -> GroupOpts
Create group options with the given group_id.
Sourcepub const fn shards(self, count: u32) -> GroupOpts
pub const fn shards(self, count: u32) -> GroupOpts
Override virtual shard count for this subscription.
Sourcepub fn instance_id(self, id: impl Into<String>) -> GroupOpts
pub fn instance_id(self, id: impl Into<String>) -> GroupOpts
Set fleet member instance id for lease-based assignment.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GroupOpts
impl RefUnwindSafe for GroupOpts
impl Send for GroupOpts
impl Sync for GroupOpts
impl Unpin for GroupOpts
impl UnsafeUnpin for GroupOpts
impl UnwindSafe for GroupOpts
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more