How to implement a durable subscriber in ZeroMQ?

Is it possible in ZeroMQ to implement a durable subscriber using only PUB/SUB sockets and no special patterns? I found this example of durable subscriber http://zguide.zeromq.org/js:durasub, it says that it is sufficient to set the socket identity to get it working, however I tried it against the 4.0 branch (using the Node.js client) and it seems not working for me.

Also I saw in the docs that the socket identity is only used in REQ/REP and ROUTER/DEALTER sockets http://api.zeromq.org/4-0:zmq-setsockopt. So I'm confused, does ZMQ support a durable subscriber "out of the box"?