"""Test loading an ActiveMQ topic.""" from stomp import StompConnection12 class ActiveMQ(): def __init__(self, host, port): self._connection = StompConnection12([(host, port)]) self._connection.start() self._connection.connect() def publish(self, limit, destination, data): """Publish.""" for i in range(limit): self._connection.send(destination, data) def close(self): self._connection.disconnect()