refactor: move lapin code into revolt-broker crate
This commit is contained in:
@@ -28,6 +28,20 @@ port = 5672
|
||||
username = "rabbituser"
|
||||
password = "rabbitpass"
|
||||
|
||||
[rabbit.event_stream]
|
||||
# Configuration for event brokerage
|
||||
# Using default/direct exchange
|
||||
exchange = ""
|
||||
queue = "revolt.events"
|
||||
# Number of channels that can be opened per single TCP connection
|
||||
channels_per_conn = 128
|
||||
# Maximum size of the stream
|
||||
stream_max_length_bytes = 5_000_000_000
|
||||
# Size of the Bloom filter
|
||||
filter_size_bytes = 26
|
||||
# Number of messages to prefetch
|
||||
qos_prefetch = 100
|
||||
|
||||
[api]
|
||||
|
||||
[api.registration]
|
||||
|
||||
@@ -108,12 +108,24 @@ pub struct Database {
|
||||
pub redis: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
pub struct RabbitEventStream {
|
||||
pub exchange: String,
|
||||
pub queue: String,
|
||||
pub channels_per_conn: usize,
|
||||
pub stream_max_length_bytes: i64,
|
||||
pub filter_size_bytes: i64,
|
||||
pub qos_prefetch: u16,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
pub struct Rabbit {
|
||||
pub host: String,
|
||||
pub port: u16,
|
||||
pub username: String,
|
||||
pub password: String,
|
||||
|
||||
pub event_stream: RabbitEventStream,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
|
||||
Reference in New Issue
Block a user