apache / apache/rocketmq-client-python
producer can't send byte string of an image file
- Ngôn ngữ chính
- Python
- Star
- 305
- Fork
- 98
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
I tried to send sync a byte string read from an image to RMQ by the following code:
```
with open("model/test.jpeg", "rb") as f:
img_str = f.read()
msg.set_body(img_str)
ret = producer.send_sync(msg)
```
but the message body a consumer received is only a part of the byte string
```
b'\xff\xd8\xff\xdb'
```
Hướng dẫn đóng góp
Hướng nghiên cứu
Start by reproducing the issue with the producer snippet using set_body and send_sync, then trace how the message body is handled before the consumer receives it. Done means the consumer receives the complete image byte string rather than only its initial bytes; add or update a regression test if the repository has coverage for this path.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- distributed-systems
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 38/100