You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/01/22 14:44:36 UTC

[GitHub] [pulsar] BewareMyPower opened a new pull request #9287: [Python] Return MessageId in producer's synchronous send method

BewareMyPower opened a new pull request #9287:
URL: https://github.com/apache/pulsar/pull/9287


   Fixes #9176 
   
   ### Motivation
   
   Currently Python producer's send method returns nothing. However, it should returns a `MessageId` at least. 
   
   So instead of using the current `Producer::send` API, this PR
   *Explain here the context, and why you're making that change. What is the problem you're trying to solve.*
   
   ### Modifications
   
   - Add a new `Producer#send` API with an extra argument as the output argument of `MessageId`.
   - Improve the `Producer#send` related documents to ensure these methods can link to each other in Doxygen-generated websites.
   - Let Python client's `Producer#send` return a `MessageId`.
   - Add related tests.
   
   It should be noted that the current C++ `Producer::send`'s API design is strange and weird that it returns no `MessageId` explicitly. However it will set the input `Message`'s internal `MessageId` field and there're no document about it, as well as the tests.
   
   This API design is extremely terrible. I think without looking into the source code, no one could guess that the input **const** `Message` argument will **modify** its internal field after `send` is completed. So I add a new `send` method as a substitute and mark the old `send` method deprecated.
   
   ### Verifying this change
   
   - [ ] Make sure that the change passes the CI checks.
   
   This change added tests and can be verified as follows:
   
   - C++: `ProducerTest#testSynchronouslySend`
   - Python: `PulsarTest.test_producer_send`
   
   ### Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API: (**yes**)
     - The schema: (no)
     - The default values of configurations: (no)
     - The wire protocol: (no)
     - The rest endpoints: (no)
     - The admin cli options: (no)
     - Anything that affects deployment: (no)
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (yes)
     - If yes, how is the feature documented? (JavaDocs)
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #9287: [Python] Return MessageId in producer's synchronous send method

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #9287:
URL: https://github.com/apache/pulsar/pull/9287#issuecomment-766028811


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] BewareMyPower commented on pull request #9287: [Python] Return MessageId in producer's synchronous send method

Posted by GitBox <gi...@apache.org>.
BewareMyPower commented on pull request #9287:
URL: https://github.com/apache/pulsar/pull/9287#issuecomment-765881908


   /pulsarbot run-failure-checks


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] sijie merged pull request #9287: [Python] Return MessageId in producer's synchronous send method

Posted by GitBox <gi...@apache.org>.
sijie merged pull request #9287:
URL: https://github.com/apache/pulsar/pull/9287


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] Anonymitaet commented on pull request #9287: [Python] Return MessageId in producer's synchronous send method

Posted by GitBox <gi...@apache.org>.
Anonymitaet commented on pull request #9287:
URL: https://github.com/apache/pulsar/pull/9287#issuecomment-787757325


   Doc is avaliable at [here](https://pulsar.apache.org/api/python/#pulsar.Producer.send).
   ![image](https://user-images.githubusercontent.com/50226895/109470829-e500dc80-7aaa-11eb-92b6-0900d0a8161c.png)
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] sijie merged pull request #9287: [Python] Return MessageId in producer's synchronous send method

Posted by GitBox <gi...@apache.org>.
sijie merged pull request #9287:
URL: https://github.com/apache/pulsar/pull/9287


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [pulsar] Anonymitaet edited a comment on pull request #9287: [Python] Return MessageId in producer's synchronous send method

Posted by GitBox <gi...@apache.org>.
Anonymitaet edited a comment on pull request #9287:
URL: https://github.com/apache/pulsar/pull/9287#issuecomment-787757325


   Doc is added and avaliable at [here](https://pulsar.apache.org/api/python/#pulsar.Producer.send).
   ![image](https://user-images.githubusercontent.com/50226895/109470829-e500dc80-7aaa-11eb-92b6-0900d0a8161c.png)
   


----------------------------------------------------------------
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:
users@infra.apache.org