You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Felipe Buccioni (Jira)" <ji...@apache.org> on 2020/04/12 08:05:00 UTC
[jira] [Updated] (QPID-8437) Python: Sends garbage binary text at
start of messages
[ https://issues.apache.org/jira/browse/QPID-8437?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felipe Buccioni updated QPID-8437:
----------------------------------
Description:
I am using `python-qpid-proton` pip package to send messages to an ActiveMQ instance, when sends it shows some garbage binary text at start, like a header.
Code:
{code:java}
def on_sendable(self, event):
if event.sender.credit and not self.sent:
self.sent = True
message = Message(
id=int(self.external_send.voucher.id),
inferred=False,
body=json.dumps(OrderedDict((
("kind", kind_to_str(self.kind)),
("first_name", self.external_send.voucher.first_name),
("last_name", self.external_send.voucher.last_name),
("phone_number", self.external_send.voucher.phone_number),
("email", self.external_send.voucher.email),
("address", self.external_send.voucher.address),
("extra_address", self.external_send.voucher.extra_address),
("city", self.external_send.voucher.city),
)))
)
message.content_type = 'text/plain; charset="utf-8"'
event.sender.send(message)
{code}
And in ActiveMQ shows the following:
{code:java}
SpESs�
�4�Sw�v{"kind": "delivery", "first_name": .... json continues
{code}
was:
I am using `python-qpid-proton` package to send messages to an ActiveMQ instance, when sends it shows some garbage binary text at start, like a header.
Code:
{code:java}
def on_sendable(self, event):
if event.sender.credit and not self.sent:
self.sent = True
message = Message(
id=int(self.external_send.voucher.id),
inferred=False,
body=json.dumps(OrderedDict((
("kind", kind_to_str(self.kind)),
("first_name", self.external_send.voucher.first_name),
("last_name", self.external_send.voucher.last_name),
("phone_number", self.external_send.voucher.phone_number),
("email", self.external_send.voucher.email),
("address", self.external_send.voucher.address),
("extra_address", self.external_send.voucher.extra_address),
("city", self.external_send.voucher.city),
)))
)
message.content_type = 'text/plain; charset="utf-8"'
event.sender.send(message)
{code}
And in ActiveMQ shows the following:
{code:java}
SpESs�
�4�Sw�v{"kind": "delivery", "first_name": .... json continues
{code}
> Python: Sends garbage binary text at start of messages
> ------------------------------------------------------
>
> Key: QPID-8437
> URL: https://issues.apache.org/jira/browse/QPID-8437
> Project: Qpid
> Issue Type: Bug
> Components: Python Client (Wrapped)
> Affects Versions: 0.30
> Reporter: Felipe Buccioni
> Priority: Major
>
> I am using `python-qpid-proton` pip package to send messages to an ActiveMQ instance, when sends it shows some garbage binary text at start, like a header.
> Code:
> {code:java}
> def on_sendable(self, event):
> if event.sender.credit and not self.sent:
> self.sent = True
> message = Message(
> id=int(self.external_send.voucher.id),
> inferred=False,
> body=json.dumps(OrderedDict((
> ("kind", kind_to_str(self.kind)),
> ("first_name", self.external_send.voucher.first_name),
> ("last_name", self.external_send.voucher.last_name),
> ("phone_number", self.external_send.voucher.phone_number),
> ("email", self.external_send.voucher.email),
> ("address", self.external_send.voucher.address),
> ("extra_address", self.external_send.voucher.extra_address),
> ("city", self.external_send.voucher.city),
> )))
> )
> message.content_type = 'text/plain; charset="utf-8"'
> event.sender.send(message)
> {code}
> And in ActiveMQ shows the following:
> {code:java}
> SpESs�
> �4�Sw�v{"kind": "delivery", "first_name": .... json continues
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org