IoticAgent.Core.AmqpLink module¶
-
class
IoticAgent.Core.AmqpLink.
AmqpLink
(host, vhost, prefix, epid, passwd, msg_callback, ka_callback, send_ready_callback, sslca=None, prefetch=128, ackpc=0.5, heartbeat=30, socket_timeout=10, startup_ignore_exc=False, conn_retry_delay=5, conn_error_log_threshold=180)¶ Bases:
object
Helper class to deal with AMQP connection.
-
is_alive
()¶ Helper function to show if send & recv Threads are running
-
last_send_exc_time
¶ Timestamp (or None) at which send thread last failed
-
send
(body, content_type='application/ubjson', timeout=5)¶ timeout indicates amount of time to wait for sending thread to be ready. set to larger than zero to wait (in seconds, fractional) or None to block.
-
start
()¶ start connection threads, blocks until started
-
stop
()¶ disconnect, blocks until stopped
-