wolfstudy commented on issue #346: URL: https://github.com/apache/pulsar-client-go/issues/346#issuecomment-674614531
Yes, @sundy-li If struct can meet our needs, as you said, the performance of struct is better than the interface, and the usability is also higher. But in the implementation of go client, we have a `message` struct, and this struct implements the `Message` interface. At the same time, on the consumer side, we wrap a `ConsumerMessage` struct, which is a pair of a `Consumer` and `Message`, so In such a scenario, the interface may be more in line with our needs. If you have better ideas, please feel free to discuss. ---------------------------------------------------------------- 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]
