Iggy is the persistent message streaming platform written in Rust, supporting QUIC, TCP and HTTP transport protocols, capable of processing millions of messages per second.
Currently, if someone wants to use IggyClient with custom server TCP address, following code is absolute minimum:
let tcp_client_config = TcpClientConfig {
server_address: get_tcp_server_addr(),
..TcpClientConfig::default()
};
let tcp_client = Box::new(TcpClient::create(Arc::new(tcp_client_config)).unwrap());
let client = IggyClient::create(tcp_client, IggyClientConfig::default(), None, None, None);
client.connect().await?;
(...)
The aim of this task is to improve IggyClientBuilder and hide TcpClient, QuicClient and HttpClient.
IggyClientConfig should be renamed to something like IggyClientBackgroundConfig
After this task is done, IggyClientBuilder should look something like:
let config = TcpClientConfig {
server_address: "127.0.0.1:8090".to_string(),
reconnection_retries: 3,
reconnection_interval: 1000,
tls_enabled: false,
tls_domain: "localhost".to_string(),
}
let client = IggyClientBuilder::new().with_config(config).build()?;
or
let client = IggyClientBuilder::new().with_tcp_config(config).build()?; // or http / quic if trait isn't possible
ClientProviderConfig can go away or at least be not preferred interface
we aim for simplicity
extra parameters should be set via IggyClientBuilder methods
Currently, if someone wants to use
IggyClient
with custom server TCP address, following code is absolute minimum:The aim of this task is to improve
IggyClientBuilder
and hideTcpClient
,QuicClient
andHttpClient
.IggyClientConfig
should be renamed to something likeIggyClientBackgroundConfig
After this task is done,
IggyClientBuilder
should look something like:ClientProviderConfig
can go away or at least be not preferred interfaceIggyClientBuilder
methods