You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Richard (JIRA)" <ji...@apache.org> on 2018/08/29 09:39:00 UTC
[jira] [Created] (PROTON-1924) Extra symbols in body while sending
to Azure IoT Hub
Richard created PROTON-1924:
-------------------------------
Summary: Extra symbols in body while sending to Azure IoT Hub
Key: PROTON-1924
URL: https://issues.apache.org/jira/browse/PROTON-1924
Project: Qpid Proton
Issue Type: Bug
Components: python-binding
Affects Versions: proton-c-0.24.0, proton-c-0.22.0
Reporter: Richard
When sending AMQP message to Azure Iot Hub (amqps://example.azure-devices.net/messages/devicebound), proton is putting some extra, unwanted symbols before my actual body content.
{code}
IOT_HUB_LISTENER = "/messages/devicebound"
user = f"{IOT_HUB_SHARED_ACCESS_KEY_NAME}@sas.root.{HOST}"
password = SAS_TOKEN
# connect
blocking_connection = BlockingConnection(f"amqps://{IOT_HUB_HOSTNAME}", allowed_mechs="PLAIN", user=user, password=password)
sender = blocking_connection.create_sender(IOT_HUB_LISTENER)
sender.send(Message(address=f"/devices/{device_id}/messages/devicebound", body="Hello World"))
{code}
The message is sent to Azure IoT Hub as I mentioned, but while reading the message from IoT Hub over MQTT, in the payload I receive every time something like this:
{code}
payload = b'*\xa1\x0b*Hello World'
{code}
I know that proton is encoding the message body according to its data type before the actual send to AMQP Broker (Azure IoT Hub) happens. Maybe comes this error from there? Is there a possibility to disable putting those symbols before actual body?
BTW: If you try to receive "proton" amqp message with uamqp from Microsoft, you'll get amqp incompatibly error. Reversed it works. Is proton doing something different?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org