The setsockopt call isn't failing. Try this code: int rc = zmq_setsockopt (publisher, ZMQ_HWM, &hwm, sizeof (hwm)); err = zmq_errno(); printf("rc=%d errno%d\n", rc, err); Some of the simpler Guide examples don't check the return code. It's something I'll fix for the next release. -Pieter