~ubuntu-branches/ubuntu/trusty/zeromq3/trusty

« back to all changes in this revision

Viewing changes to doc/zmq.txt

  • Committer: Package Import Robot
  • Author(s): Alessandro Ghedini
  • Date: 2012-06-12 10:53:58 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120612105358-irh7e8ivwc4566fi
Tags: 3.2.0~rc1+dfsg-1
* New upstream RC release
* Use repack.{local,stub} instead of get-orig-source rule
* Add 01_fix-unused-variable-error.patch
* Remove build dependency on uuid-dev (no more needed)
* Add 02_check-ifdef-SO_NOSIGPIPE.patch to fix kfreebsd build
* Add 03_fix-test_shutdown_stress-segfault.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
The 0MQ lightweight messaging kernel is a library which extends the standard
20
20
socket interfaces with features traditionally provided by specialised
21
21
_messaging middleware_ products. 0MQ sockets provide an abstraction of
22
 
asynchronous  _message queues_, multiple _messaging patterns_, message
 
22
asynchronous _message queues_, multiple _messaging patterns_, message
23
23
filtering (_subscriptions_), seamless access to multiple _transport protocols_
24
24
and more.
25
25
 
30
30
 
31
31
Context
32
32
~~~~~~~
33
 
Before using any 0MQ library functions the caller must initialise a 0MQ
34
 
'context' using _zmq_init()_. The following functions are provided to handle
35
 
initialisation and termination of a 'context':
 
33
Before using any 0MQ library functions you must create a 0MQ 'context'. When
 
34
you exit your application you must destroy the 'context'. These functions let
 
35
you work with 'contexts':
 
36
 
 
37
Create a new 0MQ context::
 
38
    linkzmq:zmq_ctx_new[3]
 
39
 
 
40
Work with context properties::
 
41
    linkzmq:zmq_ctx_set[3]
 
42
    linkzmq:zmq_ctx_get[3]
 
43
 
 
44
Destroy a 0MQ context::
 
45
    linkzmq:zmq_ctx_destroy[3]
 
46
 
 
47
Monitor a 0MQ context::
 
48
    linkzmq:zmq_ctx_set_monitor[3]
 
49
 
 
50
These deprecated functions let you create and destroy 'contexts':
36
51
 
37
52
Initialise 0MQ context::
38
53
    linkzmq:zmq_init[3]
77
92
    linkzmq:zmq_msg_init_size[3]
78
93
    linkzmq:zmq_msg_init_data[3]
79
94
 
 
95
Sending and receiving a message::
 
96
    linkzmq:zmq_msg_send[3]
 
97
    linkzmq:zmq_msg_recv[3]
 
98
 
80
99
Release a message::
81
100
    linkzmq:zmq_msg_close[3]
82
101
 
83
102
Access message content::
84
103
    linkzmq:zmq_msg_data[3]
85
104
    linkzmq:zmq_msg_size[3]
 
105
    linkzmq:zmq_msg_more[3]
 
106
 
 
107
Work with message properties::
 
108
    linkzmq:zmq_msg_get[3]
 
109
    linkzmq:zmq_msg_set[3]
86
110
 
87
111
Message manipulation::
88
112
    linkzmq:zmq_msg_copy[3]
113
137
 
114
138
Sending and receiving messages::
115
139
    linkzmq:zmq_send[3]
 
140
    linkzmq:zmq_sendmsg[3]
116
141
    linkzmq:zmq_recv[3]
 
142
    linkzmq:zmq_recvmsg[3]
117
143
 
118
144
.Input/output multiplexing
119
145
0MQ provides a mechanism for applications to multiplex input/output events over
145
171
 
146
172
Devices
147
173
~~~~~~~
148
 
Apart from the 0MQ library the 0MQ distribution includes 'devices' which are
149
 
building blocks intended to serve as intermediate nodes in complex messaging
150
 
topologies.
151
 
 
152
 
The following devices are provided:
153
 
 
154
 
Forwarder device for request-response messaging::
155
 
    linkzmq:zmq_queue[1]
156
 
 
157
 
Forwarder device for publish-subscribe messaging::
158
 
    linkzmq:zmq_forwarder[1]
159
 
 
160
 
Streamer device for parallelized pipeline messaging::
161
 
    linkzmq:zmq_streamer[1]
 
174
0MQ provides 'devices', which are building blocks that act as intermediate
 
175
nodes in complex messaging topologies. Devices can act as brokers that other
 
176
nodes connect to, proxies that connect through to other nodes, or any mix of
 
177
these two models.
 
178
 
 
179
You can start a device in an application thread, see linkzmq:zmq_device[3].
162
180
 
163
181
 
164
182
ERROR HANDLING
193
211
shall refer to this documentation alongside any documentation provided by the
194
212
vendor of their language binding.
195
213
 
196
 
Language bindings (Python, Ruby, Java and more) are provided by members
197
 
of the 0MQ community and pointers can be found on the 0MQ website.
 
214
Language bindings ($$C++$$, Python, PHP, Ruby, Java and more) are provided by
 
215
members of the 0MQ community and pointers can be found on the 0MQ website.
198
216
 
199
217
 
200
218
AUTHORS
201
219
-------
202
 
The 0MQ documentation was written by Martin Sustrik <sustrik@250bpm.com> and
203
 
Martin Lucina <martin@lucina.net>.
 
220
This 0MQ manual page was written by Martin Sustrik <sustrik@250bpm.com>,
 
221
Martin Lucina <martin@lucina.net>, and Pieter Hintjens <ph@imatix.com>.
204
222
 
205
223
 
206
224
RESOURCES