merlimat commented on pull request #308:
URL: https://github.com/apache/pulsar-client-go/pull/308#issuecomment-654438514


   > It is a dangerous operation to expose the MessageChannel to the user, and 
the user may write data and other series of custom operations to the chan. This 
may interfere with messageCh correctly receiving data from the broker. 
   
   Barring the API incompatibility, there are many ways with which an 
application can uses the API in the "wrong" way, impacting the proper behavior 
of the consumer. In all the cases, this would just impact the client itself, 
not the broker, so I don't think it's an issue.
   
   > We should recommend users to use consumer.Chan() instead of it, instead of 
directly exposing a readable and writable channel
   
   The `Chan()` method just returns the internal channel, so there would be 
nothing preventing me from writing into that channel, no?
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to