AcknowledgeAll enables an acknowledgement mode where acknowledging message 100 will also ack the preceding messages.
AcknowledgeExplicit requires that every message received be acknowledged.
AcknowledgeNone disables message acknowledgement.
AckWait sets the time a delivered message might remain unacknowledged before redelivery is attempted.
No description provided by the author
No description provided by the author
No description provided by the author
APISubject returns API subject with prefix applied.
No description provided by the author
BackoffIntervals sets a series of intervals by which retries will be attempted for this consumr.
BackoffPolicy sets a consumer policy.
No description provided by the author
ConsumerDescription is a textual description of this consumer to provide additional context.
No description provided by the author
No description provided by the author
ConsumerName sets a name for the consumer, when creating a durable consumer use DurableName, using ConsumerName allows for creating named ephemeral consumers, else a random name will be generated.
No description provided by the author
ConsumerOverrideReplicas override the replica count inherited from the Stream with this value.
ConsumerQueryApiLevelMin limits results to assets requiring API Level above or equal to level.
ConsumerQueryExpression filters the consumers using the expr expression language Using this option with a binary built with the `noexprlang` build tag will always return [ErrNoExprLangBuild].
ConsumerQueryInvert inverts the logic of filters, older than becomes newer than and so forth.
ConsumerQueryIsBound finds push consumers that are bound or pull consumers with waiting pulls.
ConsumerQueryIsPinned finds consumers with pinned clients on all their groups.
ConsumerQueryIsPull finds only Pull consumers.
ConsumerQueryIsPush finds only Push consumers.
ConsumerQueryLeaderServer finds clustered consumers where a certain node is the leader.
ConsumerQueryOlderThan finds consumers older than age.
ConsumerQueryReplicas finds streams with a certain number of replicas or less.
ConsumerQueryWithDeliverySince finds only consumers that has had deliveries since ts.
ConsumerQueryWithFewerAckPending finds consumers with fewer pending messages.
ConsumerQueryWithFewerPending finds consumers with fewer unprocessed messages.
ConsumerQueryWithFewerWaiting finds consumers with fewer waiting pulls.
DeliverAllAvailable delivers messages starting with the first available in the stream.
DeliverBodies configures the consumer to deliver the headers and the bodies for each message.
DeliverGroup when set will only deliver messages to subscriptions matching that group.
DeliverHeadersOnly configures the consumer to only deliver existing header and the `Nats-Msg-Size` header, no bodies.
DeliverLastPerSubject delivers the last message for each subject in a wildcard stream based on the filter subjects of the consumer.
DeliverySubject is the subject where a Push consumer will deliver its messages.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
DurableName is the name given to the consumer, when not set an ephemeral consumer is created.
EventSubject returns Event subject with prefix applied.
No description provided by the author
FilterServerMetadata copies metadata with the server generated metadata removed.
FilterStreamBySubject filters the messages in a wildcard stream to those matching a specific subject.
No description provided by the author
IdleHeartbeat sets the time before an idle consumer will send a empty message with Status header 100 indicating the consumer is still alive.
InactiveThreshold is the idle time an ephemeral consumer allows before it is removed.
No description provided by the author
IsErrorResponse checks if the message holds a standard JetStream error.
IsInternalStream indicates if a stream is considered 'internal' by the NATS team, that is, it's a backing stream for KV, Object or MQTT state.
IsKVBucketStream determines if a stream is a KV bucket.
IsMQTTStateStream determines if a stream holds internal MQTT state.
IsNatsError checks if err is a ApiErr matching code.
IsObjectBucketStream determines if a stream is a Object bucket.
IsOKResponse checks if the message holds a standard JetStream error.
IsValidName verifies if n is a valid stream, template or consumer name.
No description provided by the author
LinearBackoffPeriods creates a backoff policy without any jitter suitable for use in a consumer backoff policy
The periods start from min and increase linearly until ~max.
LinearBackoffPolicy creates a backoff policy with linearly increasing steps between min and max.
MaxAckPending maximum number of messages without acknowledgement that can be outstanding, once this limit is reached message delivery will be suspended.
No description provided by the author
No description provided by the author
No description provided by the author
MaxDeliveryAttempts is the number of times a message will be attempted to be delivered.
No description provided by the author
No description provided by the author
No description provided by the author
MaxRequestBatch is the largest batch that can be specified when doing pulls against the consumer.
MaxRequestExpires is the longest pull request expire the server will allow.
MaxRequestMaxBytes sets the limit of max bytes a consumer my request.
MaxWaiting is the number of outstanding pulls that are allowed on any one consumer.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewConsumerConfiguration generates a new configuration based on template modified by opts.
NewStreamConfiguration generates a new configuration based on template modified by opts.
NextSubject returns the subject used to retrieve the next message for pull-based Consumers, empty when not a pull-base consumer.
No description provided by the author
No description provided by the author
No description provided by the author
OverflowPriorityGroups sets the consumer to support overflow pull requests.
PagerFilterSubject sets a filter subject for the pager.
PagerSize is the size of pages to walk.
PagerStartDelta sets a starting time delta for the pager.
PagerStartId sets a starting stream sequence for the pager.
PagerTimeout is the time to wait for messages before it's assumed the end of the stream was reached.
ParseDuration parse durations with additional units over those from standard go parser.
ParseErrorResponse parses the JetStream response, if it's an error returns an error instance holding the message else nil.
ParseEvent parses event e and returns event as for example *api.ConsumerAckMetric, all unknown event schemas will be of type *UnknownMessage.
ParseJSMsgMetadata parse the reply subject metadata to determine message metadata
When given a message obtained using Direct Get APIs several fields will be filled in but consumer related ones will not as there is no consumer involved in that case.
ParseJSMsgMetadataDirect parses the DIRECT GET headers into a MsgInfo, in this case all consumer related properties will not be filled in as there is no consumer involved.
ParseJSMsgMetadataReply parses the reply subject of a JetStream originated message.
ParsePubAck parses a stream publish response and returns an error if the publish failed or parsing failed.
No description provided by the author
PinnedClientPriorityGroups sets the consumer to be a pinned client priority consumer with a certain list of groups.
No description provided by the author
No description provided by the author
No description provided by the author
PushFlowControl enables flow control for push based consumers.
RateLimitBitsPerSecond limits message delivery to a rate in bits per second.
ReplayAsReceived delivers messages at the rate they were received at.
ReplayInstantly delivers messages to the consumer as fast as possible.
No description provided by the author
No description provided by the author
RestoreConfiguration overrides the configuration used to restore.
RestoreNotify notifies cb about progress of the restore operation.
SamplePercent configures sampling of a subset of messages expressed as a percentage.
ServerCidString takes a kind like server.CLIENT a similar cid like the server would, eg cid:10.
ServerKindString takes a kind like server.CLIENT and returns a string describing it.
SnapshotChunkSize sets the size of messages holding data the server will send, good values are 64KB and 128KB.
SnapshotConsumers includes consumer configuration and state in backups.
SnapshotDebug enables logging using the standard go logging library.
SnapshotHealthCheck performs a health check prior to starting the snapshot.
SnapshotNotify notifies cb about progress of the snapshot operation.
No description provided by the author
StartAtSequence starts consuming messages at a specific sequence in the stream.
StartAtTime starts consuming messages at a specific point in time in the stream.
StartAtTimeDelta starts delivering messages at a past point in time.
StartWithLastReceived starts delivery at the last messages received in the stream.
StartWithNextReceived starts delivery at the next messages received in the stream.
StreamDescription is a textual description of this stream to provide additional context.
No description provided by the author
StreamQueryApiLevelMin limits results to assets requiring API Level above or equal to level.
StreamQueryClusterName limits results to servers within a cluster matched by a regular expression.
StreamQueryExpression filters the stream using the expr expression language Using this option with a binary built with the `noexprlang` build tag will always return [ErrNoExprLangBuild].
StreamQueryFewerConsumersThan limits results to streams with fewer than or equal consumers than c.
StreamQueryIdleLongerThan limits results to streams that has not received messages for a period longer than p.
StreamQueryInvert inverts the logic of filters, older than becomes newer than and so forth.
No description provided by the author
No description provided by the author
StreamQueryLeaderServer finds clustered streams where a certain node is the leader.
StreamQueryOlderThan limits the results to streams older than p.
StreamQueryReplicas finds streams with a certain number of replicas or less.
StreamQueryServerName limits results to servers matching a regular expression.
StreamQuerySubjectWildcard limits results to streams with subject interest matching standard a nats wildcard.
StreamQueryWithoutMessages limits results to streams with no messages.
No description provided by the author
SubjectIsSubsetMatch tests if a subject matches a standard nats wildcard.
No description provided by the author
No description provided by the author
WithAPIPrefix replace API endpoints like $JS.API.STREAM.NAMES with prefix.STREAM.NAMES.
WithAPIValidation validates responses sent from the NATS server using a validator.
WithDomain sets a JetStream domain, incompatible with WithApiPrefix().
WithEventPrefix replace event subjects like $JS.EVENT.ADVISORY.API with prefix.ADVISORY.
WithPedanticRequests enables pedantic mode in certain API calls that would avoid the server changing user configurations during request handling.
WithProgress enables progress tracking.
WithTimeout sets a timeout for the requests.
WithTrace enables logging of JSON API requests and responses.
No description provided by the author