6
ZeroMQ is a messaging library that allows you to easily build complex
7
communication systems. The ZeroMQ plugin allows drizzle to publish
8
transactions to a local PUB socket. Many clients can subscribe to
9
these transactions. The first frame of the message sent out is the
10
schema name the transaction touched - this enables clients to only
11
subscribe to the interesting schemas (note that certain "transactions"
12
are without a schema, like SET xyz for example, for these, the first
18
First, install zeromq, get the code from `zeromq.org
19
<http://zeromq.org>`_, then you can build drizzle, watch the
20
./configure output to verify that drizzle finds the libraries needed.
22
Now you are good to go, simply start drizzle with --plugin-add=zeromq
23
and drizzle will start publishing transactions. The only configuration
24
parameter available is:
28
--zeromq.endpoint arg (=tcp://*:9999) - the endpoint to expose.
30
Now you can write a simple python script to verify that it works,
31
something like this will work:
33
.. code-block:: python
38
s = ctx.socket(zmq.SUB)
39
s.setsockopt(zmq.SUBSCRIBE, '')
40
s.connect('tcp://localhost:9999')
47
and then you can generate some load:
51
bin/drizzleslap -c 10 -a --auto-generate-sql-add-autoincrement --burnin
53
which creates 10 threads and generates random queries.
6
See :ref:`zeromq_applier`.