User Tools

Site Tools


amqp_messages
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


Previous revision
Last 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:
 +
 +<code>
 +import sys
 +sys.path.insert(0, "/srv/hacksense/lib")
 +
 +import hacksense
 +
 +conn = hacksense.AMQPTopic()
 +
 +topic = "topic.name.here"
 +headers = {"example": 123}
 +body = "test test test"
 +
 +conn.publish(topic, headers, body)
 +</code>
 +
 +===== Rhapsody Display =====
 +
 +A message can be added to the rotation with:
 +
 +<code>
 +topic = "rhapsody.submessage"
 +headers = {"submessage_id": "uniqueid_2542868234761", "colour": "yellow"}
 +body = "Hello World"
 +</code>
 +
 +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).
  

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki