bitcapybara/budmq

producer ordered/unordered send

Closed this issue · 3 comments

  • use a QUIC connection for each producer/consumer
  • self-managed connection reconnect in producer/consumer
  • self-managed connection pool in producer/consumer
  • BudClient
    * hold the connection info: broker address, etc.
    * has a get_connection method(connection manager)
    * clonable, hold by producer/consumer
  • producer/consumer
    * get connection from client
    * setup reader/writer
    * reconnect
  • use one connection per client
  • use Arc<Connection> from client in producer/consumer
  • use a SharedError in producer/consumer to notify connection broken
  • client reader hold a HashMap<consumer_id, unbounded_sender> for all consumers, after reconnect, send AddConsumer message to reader
  • client sender hold event_tx to send AddConsumer/DelConsumer
  • consumer engine background task, receive message and send to consumer
  • consumer receive message, poll by user