rawtx & rawblock ZMQ at the same time?
Try to subscribe by using prefix raw as topic . After this you will get both message on the one listener.

socket.subscribe('raw');

socket.on('message', (topicRaw: Buffer, bodyRaw: Buffer, ...tailRaw: Buffer[]) =&gt; {

    const sequenceRaw = tailRaw[tailRaw.length - 1];
    const sequence = sequenceRaw.readInt32LE(0);
    const topic = topicRaw.toString();


    if (topic == 'rawtx') {
        const rawTX = bodyRaw.toString('hex');
        console.log(topic, sequence, rawTX);

    } else if (topic == 'rawblock') {

        const rawBlock = bodyRaw.toString('hex', 0, 80);
        console.log(topic, sequence, rawBlock);
    }
});