Age | Commit message (Collapse) | Author |
|
This reverts commit 512f3a604924fec9d89e2b4bfd6f73aa66309fa7.
|
|
Implements SP protocol versioning, legacy protocol support, and the
following pattern protocol versions:
PAIR: v2
PUBSUB: v1 (legacy), v3
REQREP: v1
PIPELINE: v2
SURVEY: v1
Engine support is only for stream_engine_t at this stage.
Signed-off-by: Martin Lucina <martin@lucina.net>
|
|
This patch is based on patch by Martin Hurton from 0MQ project.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
- subscription forwarding is handled by XSUB socket
- filtering is handled by SUB sockets
- subscriptions are decoupled from filter engines
- filter doesn't have to be able to enumarate the subscriptions
(no sf_enumerate function)
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
This patch introduces following features:
- XS_PLUGIN context option to add plugins to libxs
- XS_FILTER option to switch between different filter types
- Automatic loading of plug-ins is *not* implemented.
From the implementation point of view:
- standard prefix filter is implemented as a pluggable filter
- trie_t and mtrie_t are joined into a single class
- the code for 0MQ/3.1 compatibility is left in in the form of comments
- new test for testing re-subscriptions is added
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
- XS_PROTOCOL option added
- libxs ignores when unused flags are set to 1 (0MQ/2.1 bug)
- compatibility tests added
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
This matches the behaviour of zmq_setsockopt(ZMQ_SUBSCRIBE, ...), which also
silently drops subscription messages if the SNDHWM is reached.
Signed-off-by: Staffan Gimåker <staffan@spotify.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
The relationship of these two classes was 1:1.
Thus one of them was obsolete.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
With the introduction of subscription forwarding, the first message
sent on a PUB socket using a unidirectional transport (e.g. PGM) is
always lost due to the "subscribe to all" being done asynchronously.
This patch fixes the problem and also refactors the code to have a
single point where the "subscribe to all" is performed.
Signed-off-by: Martin Lucina <martin@lucina.net>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
When (X)SUB socket is being shut down there may be pending
outbound subscription commands in the pipes. In such case
we want to close the socket immediately instead of waiting
for the commands to be sent.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
This is a preliminary patch allowing for socket-type-specific
functionality in the I/O thread. For example, message format
can be checked asynchronously and misbehaved connections dropped
straight away.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
This patch simplifies the whole codebase significantly,
including dropping depedency on libuuid.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
So far there was no distinction between message parts used by 0MQ
and message parts used by user. Now, the message parts used by 0MQ
are marked as 'LABEL'.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
This option is a performance tweak. In devices XSUB socket filters
the messages just to send them to XPUB socket which filters them
once more. Setting ZMQ_FILTER option to 0 allows to switch the
filtering in XSUB socket off.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
This patch will prevent duplicate matching in devices in the future.
Instead of matching in both XPUB and XSUB, it'll happen only
in XPUB. Receiver endpoint will still filter messages via SUB
socket.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
So far, the pipe termination code was spread among socket type
classes, fair queuer, load balancer, etc. This patch moves
all the associated logic to a single place.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
So far, there was a pair of unidirectional pipes between a socket
and a session (or an inproc peer). This resulted in complex
problems with half-closed states and tracking which inpipe
corresponds to which outpipe.
This patch doesn't add any functionality in itself, but is
essential for further work on features like subscription
forwarding.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
This patch addresses serveral issues:
1. It gathers message related functionality scattered over whole
codebase into a single class.
2. It makes zmq_msg_t an opaque datatype. Internals of the class
don't pollute zmq.h header file.
3. zmq_msg_t size decreases from 48 to 32 bytes. That saves ~33%
of memory in scenarios with large amount of small messages.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Done because of POSIX compliance
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|
|
These are just placeholders. At the moment XPUB behaves th same
as PUB and XSUB as SUB.
Signed-off-by: Martin Sustrik <sustrik@250bpm.com>
|