apache / apache/rocketmq-client-python
producer can't send byte string of an image file
- Langage dominant
- Python
- Étoiles
- 305
- Forks
- 98
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
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'
```
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- distributed-systems
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 38/100