Stargate.Producer.produce

You're seeing just the function produce, go back to Stargate.Producer module for more information.

Specs

produce(url() | producer(), message() | [message()]) :: :ok | {:error, term()}

Produce a message or list of messages to the cluster by producer URL or producer process. Messages can be any of the accepted forms (see message type).

Producing by URL is good for irregular and/or ad hoc producer needs that do not require a persistent websocket connection and ideally with few to no query parameters to configure producer options from the default. For higher volume producing, a persistent connection with an addressable producer process is recommended.

Once the message(s) is produced, the calling process automatically blocks until it receives acknowledgement from the cluster that the message(s) has been received.

Link to this function

produce(producer, messages, mfa)

View Source

Specs

produce(producer(), message() | [message()], {module(), atom(), [term()]}) ::
  :ok | {:error, term()}

Produce a list of messages to a Stargate producer process. Messages can be any of the accepted forms (see message type).

When calling produce/3 the third argument must be an MFA tuple which is used by the producer's acknowledger process to asynchronously perform acknowledgement that the message was received by the cluster successfully. This is used to avoid blocking the calling process for performance reasons.