Skip to main content

Producers

A producer is an app or process that publishes messages to the stream. Once published, they can be processed with stream workers.

Send modes

Producers can send messages to GDN either synchronously (sync) or asynchronously (async).

ModeDescription
Sync sendThe producer will wait for acknowledgement from the broker after sending each message. If acknowledgment isn't received then the producer will consider the send operation a failure
Async sendThe producer will put the message in a blocking queue and return immediately. The client library will then send the message to the broker in the background. If the queue is full, the producer could be blocked or fail immediately when calling the API, depending on arguments passed to the producer.

Compression

Messages published by producers can be compressed during transportation in order to save bandwidth. Macrometa streams currently supports two types of compression:

Batching

If batching is enabled, the producer will accumulate and send a batch of messages in a single request. Batching size is defined by the maximum number of messages and maximum publish latency.