Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new python sdk #864

Merged
merged 6 commits into from
Nov 8, 2024
Merged

new python sdk #864

merged 6 commits into from
Nov 8, 2024

Conversation

zhouli11
Copy link
Contributor

@zhouli11 zhouli11 commented Nov 6, 2024

This PR completely refactors the existing Python SDK, including the following content:

  1. It hides the implementation details of coroutines. Users do not need to understand asyncio API, It is simpler to use.
  2. It provides asynchronous methods for sending, receiving, and acknowledging message.
  3. It implements thread safety for using multiple producers and consumers in a multithreaded environment, the existing version can’t work under a multi-threaded environment.
  4. It implements metrics based on OpenTelemetry.
  5. It fixes some bugs, such as multiple connections for the same endpoints、 heartbeat failures and so on
  6. It fixes the incorrect package dependencies.

@beiwei30
Copy link
Member

beiwei30 commented Nov 7, 2024

LGTM. This is a feature the community has been looking forward to, good job :)

Copy link
Contributor

@lollipopjin lollipopjin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lollipopjin lollipopjin merged commit 552cf9e into apache:master Nov 8, 2024
15 checks passed
@feipengzhao
Copy link

feipengzhao commented Dec 11, 2024

rocketmq 5.0 的 python client 只更新到 0.1版本,能在生产环境使用吗,靠不靠谱 @lollipopjin @zhouli11

@zhouli11
Copy link
Contributor Author

rocketmq 5.0 的 python client 只更新到 0.1版本,能在生产环境使用吗,靠不靠谱 @lollipopjin @zhouli11

0.1这个版本不要用了,后面会删除掉,5.0.1是第一个可以用的正式版本

@feipengzhao
Copy link

好的,请问python 的GRPC客户端会提供 类似java的全量功能吗

@zhouli11
Copy link
Contributor Author

好的,请问python 的GRPC客户端会提供 类似java的全量功能吗

目前还没全部对齐,主要是不支持pushconsumer,其他主要功能普通、定时、事务消息是都支持,顺序消费也支持,我们会继续完善python的功能,这个后续肯定会继续迭代和维护的

@feipengzhao
Copy link

RocketMQ 5.0监控报警功能,在消费者 在线/掉线 都会进行消息堆积的数据收集以及报警吗,比较关注监控报警功能,还有消息延迟时间的报警

@feipengzhao
Copy link

@zhouli11

python 5.0.1
normal producer 发送message 在 message_id 前面总是加个01,然后阿里云控制台也有
但是consumer 拉取的message_id 去掉了01, 这样在ack的时候都失败了,我手动给message_id 加了个01 ,然后ack 才成功,这是个bug

@llleixx
Copy link

llleixx commented Dec 31, 2024

该版本即使是同步发送也会用到事件循环,导致与 fastapi 这种异步框架使用时,会发生 attached to a different loop 错误。

这个有解决办法吗?

@zhouli11
Copy link
Contributor Author

zhouli11 commented Jan 2, 2025 via email

@zhouli11
Copy link
Contributor Author

zhouli11 commented Jan 2, 2025

该版本即使是同步发送也会用到事件循环,导致与 fastapi 这种异步框架使用时,会发生 attached to a different loop 错误。

这个有解决办法吗?

已经确认原因了,会在近期修复这个问题

@feipengzhao
Copy link

Ubuntu
python3.12
rocketmq-python-client 5.0.2

我配置的测试环境,大部分时间没数据消费,拉取一段时间的空列表,然后会报 Deadline Exceeded 然后过段时间自动回复,但这样会导致对应的消息堆积,然后监控报警触发,这个问题出现了多次,注释说是存储服务器的问题,请问在使用时如何规避这个问题

Exception: <AioRpcError of RPC that terminated with: status = StatusCode.DEADLINE_EXCEEDED details = "Deadline Exceeded" debug_error_string = "UNKNOWN:Error received from peer {created_time:"2025-01-11T09:42:25.995335662+08:00", grpc_status:4, grpc_message:"Deadline Exceeded"}"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants