Skip to content

Instantly share code, notes, and snippets.

@jrossi
Created February 4, 2014 17:14
Show Gist options
  • Select an option

  • Save jrossi/8808118 to your computer and use it in GitHub Desktop.

Select an option

Save jrossi/8808118 to your computer and use it in GitHub Desktop.
import zmq
context = zmq.Context()
s = context.socket(zmq.SUB)
s.connect("tcp://localhost:11999")
s.setsockopt(zmq.SUBSCRIBE, "")
import pika
connection = pika.BlockingConnection()
channel = connection.channel()
while 1:
d = s.recv()
channel.basic_publish(exchange='ossec',
routing_key='ossec.alert',
body=d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment