zeromq / zeromq.js

:zap: Node.js bindings to the ØMQ library
http://zeromq.github.io/zeromq.js/
MIT License
1.46k stars 211 forks source link

ZMQ_CONFLATE option appears to be unavailable in 6.0.0-beta.19 (using compatibility zeromq/v5-compat.js) #607

Open sjlyoung58 opened 6 months ago

sjlyoung58 commented 6 months ago

Importing ZMQ_CONFLATE gives undefined I cannot access/use the ZMQ_CONFLATE option

Reproducing

import zeromq from 'zeromq/v5-compat.js';

const { ZMQ_SNDHWM } = zeromq; // Import the socket option constant
console.log(`ZMQ_SNDHWM = ${ZMQ_SNDHWM}`);
const { ZMQ_CONFLATE } = zeromq; // Import the socket option constant
console.log(`ZMQ_CONFLATE = ${ZMQ_CONFLATE}`);

output...

ZMQ_SNDHWM = 23
ZMQ_CONFLATE = undefined

Expected behavior The import of ZMQ_CONFLATE should succeed and return an integer value

Tested on

sjlyoung58 commented 6 months ago

If I grep the zeromq src directory I get this which may be a clue (missing in src/compat.ts?)

grep -r CONFLATE node_modules/zeromq/src/
node_modules/zeromq/src/index.ts:   * ZMQ_CONFLATE
node_modules/zeromq/src/index.ts:   * ZMQ_CONFLATE
node_modules/zeromq/src/index.ts:   * ZMQ_CONFLATE
node_modules/zeromq/src/index.ts:   * ZMQ_CONFLATE
node_modules/zeromq/src/index.ts:   * ZMQ_CONFLATE
grep -r SNDHWM node_modules/zeromq/src/
node_modules/zeromq/src/socket.cc:        ZMQ_SNDHWM,
node_modules/zeromq/src/compat.ts:  ZMQ_SNDHWM: 23,
node_modules/zeromq/src/compat.ts:      case longOptions.ZMQ_SNDHWM:
node_modules/zeromq/src/compat.ts:      case longOptions.ZMQ_SNDHWM:
node_modules/zeromq/src/index.ts:   * ZMQ_SNDHWM