View Source Gnat.Jetstream (gnat v1.9.1)

Provides functions for interacting with a NATS Jetstream server.

Summary

Functions

Sends AckAck acknowledgement to the server.

Sends AckNext acknowledgement to the server.

Sends AckProgress acknowledgement to the server.

Sends AckTerm acknowledgement to the server.

Sends AckNak acknowledgement to the server.

Functions

ack(map)

@spec ack(message :: Gnat.message()) :: :ok

Sends AckAck acknowledgement to the server.

Acknowledges a message was completely handled.

ack_next(map, consumer_subject)

@spec ack_next(message :: Gnat.message(), consumer_subject :: binary()) :: :ok

Sends AckNext acknowledgement to the server.

Acknowledges the message was handled and requests delivery of the next message to the reply subject. Only applies to Pull-mode.

ack_progress(map)

@spec ack_progress(message :: Gnat.message()) :: :ok

Sends AckProgress acknowledgement to the server.

When sent before the AckWait period indicates that work is ongoing and the period should be extended by another equal to AckWait.

ack_term(map)

@spec ack_term(message :: Gnat.message()) :: :ok

Sends AckTerm acknowledgement to the server.

Instructs the server to stop redelivery of a message without acknowledging it as successfully processed.

nack(map)

@spec nack(message :: Gnat.message()) :: :ok

Sends AckNak acknowledgement to the server.

Signals that the message will not be processed now and processing can move onto the next message. NAK'd message will be retried.