1

Using the jzmq wrapper:

scala> import org.zeromq.ZMQ import org.zeromq.ZMQ

scala> val context = ZMQ.context(1)
context: org.zeromq.ZMQ.Context = org.zeromq.ZMQ$Context@56d58984

scala> val socket = context.socket(ZMQ.REP)
socket: org.zeromq.ZMQ.Socket = org.zeromq.ZMQ$Socket@2a5a0f9

scala> socket.getHWM()
res6: Long = -1

scala> socket.setHWM(200)

scala> socket.getHWM()
res8: Long = -1

This seems to be depreacted in version 3:

https://github.com/zeromq/jzmq/blob/750f2eecaa4c71adf86c156fab5840a2f614d4ea/src/org/zeromq/ZMQ.java#L895-900

Anyone knows why? and what's the alternative to set a HWM using jzqm + zmq3?

2 Answers 2

5

Have a look at: http://zeromq.org/docs:3-1-upgrade

In zeromq 3.2 HWM has been split into send and receive high water mark: ZMQ_SNDHWM and ZMQ_RCVHWM.

The functions you are looking for in jzmq are:

long    getRcvHWM()
long    getSndHWM()
void    setRcvHWM(long rcvHWM)
void    setSndHWM(long sndHWM) 
2

The CZMQ binding simulates the old HWM option, and other bindings might do the same.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.