You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yanchaomei (via GitHub)" <gi...@apache.org> on 2023/05/29 07:26:47 UTC

[GitHub] [rocketmq-clients] yanchaomei opened a new pull request, #528: complete stream rpc function & rpc_client_mock

yanchaomei opened a new pull request, #528:
URL: https://github.com/apache/rocketmq-clients/pull/528

   <!-- Please make sure the target branch is right. In most case, the target branch should be `master`. -->
   
   
   <!-- Please ensure that the related issue has already been created, and [link this pull request to that issue using keywords](<https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword>) to ensure automatic closure. -->
   
   ### Brief Description
   
   <!-- Write a brief description for your pull request to help the maintainer understand the reasons behind your changes. -->
   
   complete stream rpc function receiveMessages & telemetry. 
   Add partial unit test
   
   
   <!-- In order to ensure the code quality of Apache RocketMQ, we expect every pull request to have undergone thorough testing. -->
   


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq-clients] aaron-ai commented on a diff in pull request #528: complete stream rpc function & rpc_client_mock

Posted by "aaron-ai (via GitHub)" <gi...@apache.org>.
aaron-ai commented on code in PR #528:
URL: https://github.com/apache/rocketmq-clients/pull/528#discussion_r1218815070


##########
python/rocketmq/rpc_client.py:
##########
@@ -67,6 +67,20 @@ async def send_message(
     ):
         return await self.__stub.SendMessage(request, timeout=timeout_seconds)
 
+    async def receive_message(
+        self, request: service_pb2.ReceiveMessageRequest, timeout_seconds: int
+    ):
+        results = self.__stub.ReceiveMessage(request, timeout=timeout_seconds)
+        response = []
+        try:
+            async for result in results:
+                if result.HasField('message'):
+                    response.append(result.message)
+        except Exception as e:
+            print(f"An error occurred: {e}")

Review Comment:
   use logger rather than standard output.



-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq-clients] aaron-ai commented on a diff in pull request #528: complete stream rpc function & rpc_client_mock

Posted by "aaron-ai (via GitHub)" <gi...@apache.org>.
aaron-ai commented on code in PR #528:
URL: https://github.com/apache/rocketmq-clients/pull/528#discussion_r1209039596


##########
python/client/rpc_client.py:
##########
@@ -66,7 +66,13 @@ async def query_assignment(self, request, timeout_seconds: int):
 
     # TODO: Not yet implemented

Review Comment:
   Remove the redundant comment here.



-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq-clients] aaron-ai merged pull request #528: complete stream rpc function & rpc_client_mock

Posted by "aaron-ai (via GitHub)" <gi...@apache.org>.
aaron-ai merged PR #528:
URL: https://github.com/apache/rocketmq-clients/pull/528


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [rocketmq-clients] aaron-ai commented on pull request #528: complete stream rpc function & rpc_client_mock

Posted by "aaron-ai (via GitHub)" <gi...@apache.org>.
aaron-ai commented on PR #528:
URL: https://github.com/apache/rocketmq-clients/pull/528#issuecomment-1566732784

   @yanchaomei Could you fix the CI issues above?


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org