Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 1.53 KB

messages.md

File metadata and controls

26 lines (18 loc) · 1.53 KB

RedisSMQ / Docs / Messages

Messages

ProducibleMessage Class is responsible for carrying application data, sometimes referred to as message payload, which may be delivered to a consumer to be processed asynchronously.

The message payload can be of any valid JSON data type. It may be a simple text message like Hello world or a complex data type like {hello: 'world'}.

const { ProducibleMessage } = require('redis-smq');

const msg = new ProducibleMessage();
msg.setBody({ hello: 'world' }).setTTL(3600000).setRetryThreshold(5);

The ProducibleMessage class provides many methods for setting up different delivery/consumption parameters such as message priority, message TTL, retry threshold, etc.

See: