Closed theelderbeever closed 1 week ago
@theelderbeever Thank you for your contribution! Can you provide a bit more on the context of why this is needed. Is this just to have a way to get low level access to the TCPConnection or am I missing something?
@dhonig "needed" is probably an overstatement. It just represents and ease-of-use/high-level way of creating the underlying concrete type. After seeing the other variants of the BrokerConnection
after looking at more examples it is probably not a great pattern to use so feel free to reject it!
My instinct here is that things like this offer some convenience at the cost of ease of use and possibly complexity. I'm going to bite on your suggestion that this is probably not needed. If there is a concrete use case that necessitates this then we can re-consider. Thanks @theelderbeever! Look forward to your future contributions!
@dhonig Yep totally understand. An easier and even less pervasive approach would likely just be exposing type
s anyway...
pub type TcpConsumerBuilder = ConsumerBuilder<TcpConnection>;
which then would be used like
let builder = TcpConsumerBuilder::new(...);
However, even that is ultimately not a necessary thing.
Adds methods for directly creating
ProducerBuilder<TcpConnection>
andConsumerBuilder<TcpConnection>
without needing to define the genericT: ConnConfig
.