User Tools

Site Tools


amqp_messages

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
amqp_messages [2015-10-05 15:55] – external edit 127.0.0.1amqp_messages [2020-06-08 00:59] (current) – removed river
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). 
  
amqp_messages.1444060556.txt.gz · Last modified: 2015-10-05 15:55 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki