Important Note Agent AMQP functionality is now deprecated and will shortly become unsupported. Any attempt to interact with imp API amqp objects and methods on unregistered development devices or on production devices will generate a runtime error.
If you are using or intend to use Azure IoTHub, we recommend you make use of MQTT instead of AMQP. Please see our Azure IoT Hub integration for more information.
The amqpmessage object represents each AMQP message sent or received by the agent. You can create a new amqpmessage for transmission by calling amqp.createmessage() or amqp.createbinarymessage() as appropriate. Messages received through the callback registered by amqpsession.openreceiver() are provided as amqpmessage objects (by way of amqpdelivery objects).
The amqpmessage object also has the following deprecated member methods, which should not be used in new code, but are documented here as an aid to understanding and migrating old code: