IMQOptions.useGzip property
Enable message compression for serialization. Increases a worker CPU load but decreases network traffic between workers and the queue host. Defaults to false.
Signature:
useGzip?: boolean;
Remarks
It decides how this queue writes. Every queue reads plain, gzipped and zstd messages alike, so producers and consumers need not agree on it. A consumer older than that reader still has to agree: there a mismatch fails deserialization, emits an error event named OnMessage and drops the message permanently, even under IMQOptions.safeDelivery.
Every gzipped byte travels as a character of a UTF-8 string, so about half of them take two bytes on the wire; IMQOptions.compressAbove is usually the better choice.
Applies to queue messages only. IMessageQueue.publish() and IMessageQueue.subscribe() payloads are always plain JSON.
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.