blob: 5fdaa1cc3e8895bab6cbc5fe5c6ec119164134c1 [file] [log] [blame]
edition = "2023";
package milotic_hft;
import "identifier.proto";
message SubscriptionParams {
// The interval between two consecutive batches of readings.
// If not set, the default sampling interval is implementation defined.
int32 sampling_interval_ms = 1;
// The interval between two consecutive batches of readings.
//
// Note: We purposely avoid using batch_size as a way to control the export
// interval. This is because different data sources may have different
// collection mechanics and if we need to batch data across multiple data
// sources, we would need a complex synchronization mechanism to ensure that
// the batches are exported at the same time.
//
// With the export interval, we can simply wait for the specified amount of
// time between two consecutive batch exports and get new data since the last
// export.
int32 export_interval_ms = 2;
// The number of batches to export before cancelling the subscription.
// If set to 0, the subscription will remain active indefinitely.
// If not set, the subscription will be cancelled after the first batch.
int32 num_batches = 3 [default = 1];
// The identifier of the data source to subscribe to.
Identifier identifier = 4;
}