Class: ZMQ::Socket::Pub

Inherits:
ZMQ::Socket show all
Includes:
UpstreamSocket
Defined in:
lib/zmq/socket/pub.rb,
ext/rbczmq/socket.c

Constant Summary collapse

TYPE_STR =

ZMQ::Socket::Pub

A socket of type ZMQ::Socket::Pub is used by a publisher to distribute data. Messages sent are distributed in a fan out fashion to all connected peers. The ZMQ::Socket#recv function is not implemented for this socket type.

When a ZMQ::Socket::Pub socket enters an exceptional state due to having reached the high water mark for a subscriber, then any messages that would be sent to the subscriber in question shall instead be dropped until the exceptional state ends. The ZMQ::Socket#send function shall never block for this socket type.

Summary of ZMQ::Socket::Pub characteristics

Compatible peer sockets

ZMQ::Socket::Sub

Direction

Unidirectional

Send/receive pattern

Send only

Incoming routing strategy

N/A

Outgoing routing strategy

Fan out

ZMQ::Socket#hwm option action

Drop

"PUB"

Constants inherited from ZMQ::Socket

BOUND, CONNECTED, DISCONNECTED, PENDING, PROTO_REXP

Instance Method Summary collapse

Methods included from UpstreamSocket

included, #poll_readable?

Methods inherited from ZMQ::Socket

#affinity, #affinity=, #backlog, #backlog=, #bind, #close, #connect, #connect_all, #delay_attach_on_connect=, #disconnect, #endpoint, #endpoints, #events, #fd, handle_fsm_errors, #identity=, #ipv4only=, #ipv4only?, #last_endpoint, #linger, #linger=, #maxmsgsize, #maxmsgsize=, #monitor, #multicast_hops, #multicast_hops=, #poll, #poll_readable?, #poll_writable?, #rate, #rate=, #rcvbuf, #rcvbuf=, #rcvhwm, #rcvhwm=, #rcvmore?, #rcvtimeo, #rcvtimeo=, #readable?, #real_bind, #real_connect, #reconnect_ivl, #reconnect_ivl=, #reconnect_ivl_max, #reconnect_ivl_max=, #recovery_ivl, #recovery_ivl=, #recv, #recv_frame, #recv_frame_nonblock, #recv_message, #recv_nonblock, #router_mandatory=, #router_raw=, #send, #send_frame, #send_message, #sendm, #sndbuf, #sndbuf=, #sndhwm, #sndhwm=, #sndtimeo, #sndtimeo=, #state, #subscribe, #to_s, #type_str, #unbind, #unsubscribe, unsupported_api, #verbose=, #writable?, #xpub_verbose=

Instance Method Details

#typeObject



25
26
27
# File 'lib/zmq/socket/pub.rb', line 25

def type
  ZMQ::PUB
end