amqp_messages
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revisionLast revision | |||
— | amqp_messages [2015-10-05 15:55] – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== AMQP Messages ====== | ||
+ | |||
+ | Python example, running on kay: | ||
+ | |||
+ | < | ||
+ | import sys | ||
+ | sys.path.insert(0, | ||
+ | |||
+ | import hacksense | ||
+ | |||
+ | conn = hacksense.AMQPTopic() | ||
+ | |||
+ | topic = " | ||
+ | headers = {" | ||
+ | body = "test test test" | ||
+ | |||
+ | conn.publish(topic, | ||
+ | </ | ||
+ | |||
+ | ===== Rhapsody Display ===== | ||
+ | |||
+ | A message can be added to the rotation with: | ||
+ | |||
+ | < | ||
+ | topic = " | ||
+ | headers = {" | ||
+ | body = "Hello World" | ||
+ | </ | ||
+ | |||
+ | submessage_id should be a unique reference for your message. If you send a later message with the same ID, it will be replaced instead of being added to the rotation. | ||
+ | |||
+ | colour is optional and may be red, yellow or green. | ||
+ | |||
+ | Messages will stay in rotation for approximately 10 minutes, so long-term messages should be resent regularly (using the same submessage_id each time). | ||