Gleiphir2769 commented on PR #1055: URL: https://github.com/apache/pulsar-client-go/pull/1055#issuecomment-1631898679
Hi @gunli. > Calculte the required resouce before we put a request into the dataChan Before chunking introduction, the semaphore is required **before** dataChan. I moved it from `internalSendAsync` to `internalSend` because `chunking` need to get `maxMessageSize` by asking broker. https://github.com/apache/pulsar-client-go/blob/be3574019383ac0cdc65fec63e422fcfd6c82e4b/pulsar/producer_partition.go#L569-L572 If we can get it brefore `internalSend`, we can make a easier way to reserve resouce. > Add a sendRequest.done() method, when a request is done (succeed or failed), call it Sounds great. It's a bit difficult to understand `sendRequest.callback()`. And I think we can fix these bugs firstly. Refactoring work can be done in parallel. What do you think? -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
