Skip to content

Commit

Permalink
Silently ignore send error if a subscriber queue is full
Browse files Browse the repository at this point in the history
This is a situation which can occur when subscribers read too slow.

Complies to the zmq specification (https://rfc.zeromq.org/spec/29/).

Fixes #145.
  • Loading branch information
Nils Jeisecke committed Oct 29, 2021
1 parent 8f2dacb commit 468cb15
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/pub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ impl SocketSend for PubSocket {
dbg!(e);
}
}
Err(ZmqError::BufferFull(_)) => {
// ignore silently. https://rfc.zeromq.org/spec/29/ says:
// For processing outgoing messages:
// SHALL silently drop the message if the queue for a subscriber is full.
}
Err(e) => {
dbg!(e);
todo!()
Expand Down

0 comments on commit 468cb15

Please sign in to comment.