glats/jetstream
Types
pub type DiscardPolicy {
DiscardOld
DiscardNew
}
Constructors
-
DiscardOld -
DiscardNew
Errors that can be returned when working with Jetstream.
pub type JetstreamError {
JetstreamNotEnabledForAccount(String)
JetstreamNotEnabled(String)
InsufficientResources(String)
InvalidStreamConfig(String)
StreamNameInSubjectDoesNotMatch(String)
StreamNameInUse(String)
StreamNotFound(String)
StreamPurgeNotAllowed(String)
NoMessageFound(String)
ConsumerNotFound(String)
ConsumerNameExists(String)
ConsumerAlreadyExists(String)
WrongLastSequence(String)
BadRequest(String)
Unknown(Int, String)
DecodeError(String)
Timeout
NoResponders
}
Constructors
-
JetstreamNotEnabledForAccount(String) -
JetstreamNotEnabled(String) -
InsufficientResources(String) -
InvalidStreamConfig(String) -
StreamNameInSubjectDoesNotMatch(String) -
StreamNameInUse(String) -
StreamNotFound(String) -
StreamPurgeNotAllowed(String) -
NoMessageFound(String) -
ConsumerNotFound(String) -
ConsumerNameExists(String) -
ConsumerAlreadyExists(String) -
WrongLastSequence(String) -
BadRequest(String) -
Unknown(Int, String) -
DecodeError(String) -
Timeout -
NoResponders
pub type RetentionPolicy {
LimitsPolicy
InterestPolicy
WorkQueuePolicy
}
Constructors
-
LimitsPolicy -
InterestPolicy -
WorkQueuePolicy
pub type StorageType {
FileStorage
MemoryStorage
}
Constructors
-
FileStorage -
MemoryStorage
Functions
pub fn ack(conn: Subject(ConnectionMessage), message: Message) -> Result(
Nil,
String,
)
Sends an acknowledgement for a message.
pub fn nack(conn: Subject(ConnectionMessage), message: Message) -> Result(
Nil,
String,
)
Sends a negative acknowledgement for a message.
Delivery will be retried until ack’d or term’d.