-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zmq-source: change the way how zmq-source handle the connection creation
* In the source case syslog-ng use pull socket. When you use pull socket you must connect to socket instead of bind and the other part has to bind. * E.g.: pull -> connect | push -> bind * Remove the lot of c test scripts and use python instead.
- Loading branch information
Showing
5 changed files
with
20 additions
and
144 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env python | ||
|
||
import time | ||
import zmq | ||
|
||
def producer(): | ||
context = zmq.Context() | ||
zmq_socket = context.socket(zmq.PUSH) | ||
zmq_socket.bind("tcp://127.0.0.1:8888") | ||
for num in xrange(10000): | ||
work_message = { 'num' : num } | ||
zmq_socket.send_json(work_message) | ||
|
||
|
||
producer() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters