# Collection of code snippets by Arne Vajhøj 
# (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import time
import sys

import stomp

class MyListener(object):
    def receive(self, msg):
        print 'Received:',msg.split('\n\n')[1]

con = stomp.Connection('localhost', 61613)
con.addlistener(MyListener())
con.start()
con.subscribe('/queue/arne')
time.sleep(30)
con.disconnect()
