+303
-20
Cargo.lock
+303
-20
Cargo.lock
··························································································
+1
-2
jetstream/Cargo.toml
+1
-2
jetstream/Cargo.toml
······
+8
-4
jetstream/examples/arbitrary_record.rs
+8
-4
jetstream/examples/arbitrary_record.rs
···
+10
-5
jetstream/examples/basic.rs
+10
-5
jetstream/examples/basic.rs
···
+2
jetstream/src/error.rs
+2
jetstream/src/error.rs
+1
-1
jetstream/src/events/commit.rs
+1
-1
jetstream/src/events/commit.rs
+23
-11
jetstream/src/lib.rs
+23
-11
jetstream/src/lib.rs
······/// A wrapper connector type for working with a WebSocket connection to a Jetstream instance to·····················
+148
ufos/src/consumer.rs
+148
ufos/src/consumer.rs
···+const MAX_BATCHED_RECORDS: usize = 32; // non-blocking limit. drops oldest batched record per collection.+const MAX_BATCHED_COLLECTIONS: usize = 256; // block at this point. pretty arbitrary, limit unbounded growth since during replay it could grow a lot.+const MAX_BATCHED_DELETES: usize = 1024; // block at this point. fairly arbitrary, limit unbounded.+const MAX_ACCOUNT_REMOVES: usize = 1; // block at this point. these can be heavy so hold at each one.+let (batch_sender, batch_reciever) = channel::<EventBatch>(1); // *almost* rendezvous: one message in the middle+Err(TrySendError::Full(())) => {} // no worries if not, keep batching while waiting for capacity+self.current_batch.records.len() >= MAX_BATCHED_COLLECTIONS // full if we have collections to the max
+27
ufos/src/lib.rs
+27
ufos/src/lib.rs
···
+4
-70
ufos/src/main.rs
+4
-70
ufos/src/main.rs
······
+32
ufos/src/store.rs
+32
ufos/src/store.rs
···