Loading...
Searching...
No Matches
status.h File Reference

Go to the source code of this file.

## Enumerations

enum | natsConnStatus { NATS_CONN_STATUS_DISCONNECTED = 0 , NATS_CONN_STATUS_CONNECTING , NATS_CONN_STATUS_CONNECTED , NATS_CONN_STATUS_CLOSED , NATS_CONN_STATUS_RECONNECTING , NATS_CONN_STATUS_DRAINING_SUBS , NATS_CONN_STATUS_DRAINING_PUBS }
| The connection state. More...

enum

natsStatus {
NATS_OK = 0 , NATS_ERR , NATS_PROTOCOL_ERROR , NATS_IO_ERROR ,
NATS_LINE_TOO_LONG , NATS_CONNECTION_CLOSED , NATS_NO_SERVER , NATS_STALE_CONNECTION ,
NATS_SECURE_CONNECTION_WANTED , NATS_SECURE_CONNECTION_REQUIRED , NATS_CONNECTION_DISCONNECTED , NATS_CONNECTION_AUTH_FAILED ,
NATS_NOT_PERMITTED , NATS_NOT_FOUND , NATS_ADDRESS_MISSING , NATS_INVALID_SUBJECT ,
NATS_INVALID_ARG , NATS_INVALID_SUBSCRIPTION , NATS_INVALID_TIMEOUT , NATS_ILLEGAL_STATE ,
NATS_SLOW_CONSUMER , NATS_MAX_PAYLOAD , NATS_MAX_DELIVERED_MSGS , NATS_INSUFFICIENT_BUFFER ,
NATS_NO_MEMORY , NATS_SYS_ERROR , NATS_TIMEOUT , NATS_FAILED_TO_INITIALIZE ,
NATS_NOT_INITIALIZED , NATS_SSL_ERROR , NATS_NO_SERVER_SUPPORT , NATS_NOT_YET_CONNECTED ,
NATS_DRAINING , NATS_INVALID_QUEUE_NAME , NATS_NO_RESPONDERS , NATS_MISMATCH ,
NATS_MISSED_HEARTBEAT
}

| Status returned by most of the APIs. More...

enum

jsErrCode {
JSAccountResourcesExceededErr = 10002 , JSBadRequestErr = 10003 , JSClusterIncompleteErr = 10004 , JSClusterNoPeersErr = 10005 ,
JSClusterNotActiveErr = 10006 , JSClusterNotAssignedErr = 10007 , JSClusterNotAvailErr = 10008 , JSClusterNotLeaderErr = 10009 ,
JSClusterRequiredErr = 10010 , JSClusterTagsErr = 10011 , JSConsumerCreateErr = 10012 , JSConsumerNameExistErr = 10013 ,
JSConsumerNotFoundErr = 10014 , JSSnapshotDeliverSubjectInvalidErr = 10015 , JSConsumerDurableNameNotInSubjectErr = 10016 , JSConsumerDurableNameNotMatchSubjectErr = 10017 ,
JSConsumerDurableNameNotSetErr = 10018 , JSConsumerEphemeralWithDurableInSubjectErr = 10019 , JSConsumerEphemeralWithDurableNameErr = 10020 , JSStreamExternalApiOverlapErr = 10021 ,
JSStreamExternalDelPrefixOverlapsErr = 10022 , JSInsufficientResourcesErr = 10023 , JSStreamInvalidExternalDeliverySubjErr = 10024 , JSInvalidJSONErr = 10025 ,
JSMaximumConsumersLimitErr = 10026 , JSMaximumStreamsLimitErr = 10027 , JSMemoryResourcesExceededErr = 10028 , JSMirrorConsumerSetupFailedErr = 10029 ,
JSMirrorMaxMessageSizeTooBigErr = 10030 , JSMirrorWithSourcesErr = 10031 , JSMirrorWithStartSeqAndTimeErr = 10032 , JSMirrorWithSubjectFiltersErr = 10033 ,
JSMirrorWithSubjectsErr = 10034 , JSNoAccountErr = 10035 , JSClusterUnSupportFeatureErr = 10036 , JSNoMessageFoundErr = 10037 ,
JSNotEmptyRequestErr = 10038 , JSNotEnabledForAccountErr = 10039 , JSClusterPeerNotMemberErr = 10040 , JSRaftGeneralErr = 10041 ,
JSRestoreSubscribeFailedErr = 10042 , JSSequenceNotFoundErr = 10043 , JSClusterServerNotMemberErr = 10044 , JSSourceConsumerSetupFailedErr = 10045 ,
JSSourceMaxMessageSizeTooBigErr = 10046 , JSStorageResourcesExceededErr = 10047 , JSStreamAssignmentErr = 10048 , JSStreamCreateErr = 10049 ,
JSStreamDeleteErr = 10050 , JSStreamGeneralError = 10051 , JSStreamInvalidConfig = 10052 , JSStreamLimitsErr = 10053 ,
JSStreamMessageExceedsMaximumErr = 10054 , JSStreamMirrorNotUpdatableErr = 10055 , JSStreamMismatchErr = 10056 , JSStreamMsgDeleteFailed = 10057 ,
JSStreamNameExistErr = 10058 , JSStreamNotFoundErr = 10059 , JSStreamNotMatchErr = 10060 , JSStreamReplicasNotUpdatableErr = 10061 ,
JSStreamRestoreErr = 10062 , JSStreamSequenceNotMatchErr = 10063 , JSStreamSnapshotErr = 10064 , JSStreamSubjectOverlapErr = 10065 ,
JSStreamTemplateCreateErr = 10066 , JSStreamTemplateDeleteErr = 10067 , JSStreamTemplateNotFoundErr = 10068 , JSStreamUpdateErr = 10069 ,
JSStreamWrongLastMsgIDErr = 10070 , JSStreamWrongLastSequenceErr = 10071 , JSTempStorageFailedErr = 10072 , JSTemplateNameNotMatchSubjectErr = 10073 ,
JSStreamReplicasNotSupportedErr = 10074 , JSPeerRemapErr = 10075 , JSNotEnabledErr = 10076 , JSStreamStoreFailedErr = 10077 ,
JSConsumerConfigRequiredErr = 10078 , JSConsumerDeliverToWildcardsErr = 10079 , JSConsumerPushMaxWaitingErr = 10080 , JSConsumerDeliverCycleErr = 10081 ,
JSConsumerMaxPendingAckPolicyRequiredErr = 10082 , JSConsumerSmallHeartbeatErr = 10083 , JSConsumerPullRequiresAckErr = 10084 , JSConsumerPullNotDurableErr = 10085 ,
JSConsumerPullWithRateLimitErr = 10086 , JSConsumerMaxWaitingNegativeErr = 10087 , JSConsumerHBRequiresPushErr = 10088 , JSConsumerFCRequiresPushErr = 10089 ,
JSConsumerDirectRequiresPushErr = 10090 , JSConsumerDirectRequiresEphemeralErr = 10091 , JSConsumerOnMappedErr = 10092 , JSConsumerFilterNotSubsetErr = 10093 ,
JSConsumerInvalidPolicyErr = 10094 , JSConsumerInvalidSamplingErr = 10095 , JSStreamInvalidErr = 10096 , JSConsumerWQRequiresExplicitAckErr = 10098 ,
JSConsumerWQMultipleUnfilteredErr = 10099 , JSConsumerWQConsumerNotUniqueErr = 10100 , JSConsumerWQConsumerNotDeliverAllErr = 10101 , JSConsumerNameTooLongErr = 10102 ,
JSConsumerBadDurableNameErr = 10103 , JSConsumerStoreFailedErr = 10104 , JSConsumerExistingActiveErr = 10105 , JSConsumerReplacementWithDifferentNameErr = 10106 ,
JSConsumerDescriptionTooLongErr = 10107 , JSConsumerWithFlowControlNeedsHeartbeatsErr = 10108 , JSStreamSealedErr = 10109 , JSStreamPurgeFailedErr = 10110 ,
JSStreamRollupFailedErr = 10111 , JSConsumerInvalidDeliverSubjectErr = 10112 , JSStreamMaxBytesRequiredErr = 10113 , JSConsumerMaxRequestBatchNegativeErr = 10114 ,
JSConsumerMaxRequestExpiresToSmallErr = 10115 , JSConsumerMaxDeliverBackoffErr = 10116 , JSStreamInfoMaxSubjectsErr = 10117 , JSStreamOfflineErr = 10118 ,
JSConsumerOfflineErr = 10119 , JSNoLimitsErr = 10120 , JSConsumerMaxPendingAckExcessErr = 10121 , JSStreamMaxStreamBytesExceededErr = 10122 ,
JSStreamMoveAndScaleErr = 10123 , JSStreamMoveInProgressErr = 10124 , JSConsumerMaxRequestBatchExceededErr = 10125 , JSConsumerReplicasExceedsStreamErr = 10126 ,
JSConsumerNameContainsPathSeparatorsErr = 10127 , JSStreamNameContainsPathSeparatorsErr = 10128 , JSStreamMoveNotInProgressErr = 10129 , JSStreamNameExistRestoreFailedErr = 10130 ,
JSConsumerCreateFilterSubjectMismatchErr = 10131 , JSConsumerCreateDurableAndNameMismatchErr = 10132 , JSReplicasCountCannotBeNegativeErr = 10133
}

## Enumeration Type Documentation

## natsConnStatus

enum natsConnStatus

Enumerator
NATS_CONN_STATUS_DISCONNECTED | The connection has been disconnected.
NATS_CONN_STATUS_CONNECTING | The connection is in the process or connecting.
NATS_CONN_STATUS_CONNECTED | The connection is connected.
NATS_CONN_STATUS_CLOSED | The connection is closed.
NATS_CONN_STATUS_RECONNECTING | The connection is in the process or reconnecting.
NATS_CONN_STATUS_DRAINING_SUBS | The connection is draining subscriptions.
NATS_CONN_STATUS_DRAINING_PUBS | The connection is draining publishers.

## natsStatus

enum natsStatus

Enumerator
NATS_OK | Success.
NATS_ERR | Generic error.
NATS_PROTOCOL_ERROR | Error when parsing a protocol message, or not getting the expected message.
NATS_IO_ERROR | IO Error (network communication).
NATS_LINE_TOO_LONG | The protocol message read from the socket does not fit in the read buffer.
NATS_CONNECTION_CLOSED | Operation on this connection failed because the connection is closed.
NATS_NO_SERVER | Unable to connect, the server could not be reached or is not running.
NATS_STALE_CONNECTION | The server closed our connection because it did not receive PINGs at the expected interval.
NATS_SECURE_CONNECTION_WANTED | The client is configured to use TLS, but the server is not.
NATS_SECURE_CONNECTION_REQUIRED | The server expects a TLS connection.
NATS_CONNECTION_DISCONNECTED | The connection was disconnected. Depending on the configuration, the connection may reconnect.
NATS_CONNECTION_AUTH_FAILED | The connection failed due to authentication error.
NATS_NOT_PERMITTED | The action is not permitted.
NATS_NOT_FOUND | An action could not complete because something was not found. So far, this is an internal error.
NATS_ADDRESS_MISSING | Incorrect URL. For instance no host specified in the URL.
NATS_INVALID_SUBJECT | Invalid subject, for instance NULL or empty string.
NATS_INVALID_ARG | An invalid argument is passed to a function. For instance passing NULL to an API that does not accept this value.
NATS_INVALID_SUBSCRIPTION | The call to a subscription function fails because the subscription has previously been closed.
NATS_INVALID_TIMEOUT | Timeout must be positive numbers.
NATS_ILLEGAL_STATE | An unexpected state, for instance calling natsSubscription_NextMsg() on an asynchronous subscriber.
NATS_SLOW_CONSUMER | The maximum number of messages waiting to be delivered has been reached. Messages are dropped.
NATS_MAX_PAYLOAD | Attempt to send a payload larger than the maximum allowed by the NATS Server.
NATS_MAX_DELIVERED_MSGS | Attempt to receive more messages than allowed, for instance because of natsSubscription_AutoUnsubscribe().
NATS_INSUFFICIENT_BUFFER | A buffer is not large enough to accommodate the data.
NATS_NO_MEMORY | An operation could not complete because of insufficient memory.
NATS_SYS_ERROR | Some system function returned an error.
NATS_TIMEOUT | An operation timed-out. For instance natsSubscription_NextMsg().
NATS_FAILED_TO_INITIALIZE | The library failed to initialize.
NATS_NOT_INITIALIZED | The library is not yet initialized.
NATS_SSL_ERROR | An SSL error occurred when trying to establish a connection.
NATS_NO_SERVER_SUPPORT | The server does not support this action.
NATS_NOT_YET_CONNECTED | A connection could not be immediately established and natsOptions_SetRetryOnFailedConnect() specified a connected callback. The connect is retried asynchronously.
NATS_DRAINING | A connection and/or subscription entered the draining mode. Some operations will fail when in that mode.
NATS_INVALID_QUEUE_NAME | An invalid queue name was passed when creating a queue subscription.
NATS_NO_RESPONDERS | No responders were running when the server received the request.
NATS_MISMATCH | For JetStream subscriptions, it means that a consumer sequence mismatch was discovered.
NATS_MISSED_HEARTBEAT | For JetStream subscriptions, it means that the library detected that server heartbeats have been missed.

## jsErrCode

enum jsErrCode

Enumerator
JSAccountResourcesExceededErr | Resource limits exceeded for account.
JSBadRequestErr | Bad request.
JSClusterIncompleteErr | Incomplete results.
JSClusterNoPeersErr | No suitable peers for placement.
JSClusterNotActiveErr | JetStream not in clustered mode.
JSClusterNotAssignedErr | JetStream cluster not assigned to this server.
JSClusterNotAvailErr | JetStream system temporarily unavailable.
JSClusterNotLeaderErr | JetStream cluster can not handle request.
JSClusterRequiredErr | JetStream clustering support required.
JSClusterTagsErr | Tags placement not supported for operation.
JSConsumerCreateErr | General consumer creation failure string.
JSConsumerNameExistErr | Consumer name already in use.
JSConsumerNotFoundErr | Consumer not found.
JSSnapshotDeliverSubjectInvalidErr | Deliver subject not valid.
JSConsumerDurableNameNotInSubjectErr | Consumer expected to be durable but no durable name set in subject.
JSConsumerDurableNameNotMatchSubjectErr | Consumer name in subject does not match durable name in request.
JSConsumerDurableNameNotSetErr | Consumer expected to be durable but a durable name was not set.
JSConsumerEphemeralWithDurableInSubjectErr | Consumer expected to be ephemeral but detected a durable name set in subject.
JSConsumerEphemeralWithDurableNameErr | Consumer expected to be ephemeral but a durable name was set in request.
JSStreamExternalApiOverlapErr | Stream external api prefix must not overlap.
JSStreamExternalDelPrefixOverlapsErr | Stream external delivery prefix overlaps with stream subject.
JSInsufficientResourcesErr | Insufficient resources.
JSStreamInvalidExternalDeliverySubjErr | Stream external delivery prefix must not contain wildcards.
JSInvalidJSONErr | Invalid JSON.
JSMaximumConsumersLimitErr | Maximum consumers exceeds account limit.
JSMaximumStreamsLimitErr | Maximum number of streams reached.
JSMemoryResourcesExceededErr | Insufficient memory resources available.
JSMirrorConsumerSetupFailedErr | Generic mirror consumer setup failure.
JSMirrorMaxMessageSizeTooBigErr | Stream mirror must have max message size >= source.
JSMirrorWithSourcesErr | Stream mirrors can not also contain other sources.
JSMirrorWithStartSeqAndTimeErr | Stream mirrors can not have both start seq and start time configured.
JSMirrorWithSubjectFiltersErr | Stream mirrors can not contain filtered subjects.
JSMirrorWithSubjectsErr | Stream mirrors can not also contain subjects.
JSNoAccountErr | Account not found.
JSClusterUnSupportFeatureErr | Not currently supported in clustered mode.
JSNoMessageFoundErr | No message found.
JSNotEmptyRequestErr | Expected an empty request payload.
JSNotEnabledForAccountErr | JetStream not enabled for account.
JSClusterPeerNotMemberErr | Peer not a member.
JSRaftGeneralErr | General RAFT error.
JSRestoreSubscribeFailedErr | JetStream unable to subscribe to restore snapshot.
JSSequenceNotFoundErr | Sequence not found.
JSClusterServerNotMemberErr | Server is not a member of the cluster.
JSSourceConsumerSetupFailedErr | General source consumer setup failure.
JSSourceMaxMessageSizeTooBigErr | Stream source must have max message size >= target.
JSStorageResourcesExceededErr | Insufficient storage resources available.
JSStreamAssignmentErr | Generic stream assignment error.
JSStreamCreateErr | Generic stream creation error.
JSStreamDeleteErr | General stream deletion error.
JSStreamGeneralError | General stream failure.
JSStreamInvalidConfig | Stream configuration validation error.
JSStreamLimitsErr | General stream limits exceeded error.
JSStreamMessageExceedsMaximumErr | Message size exceeds maximum allowed.
JSStreamMirrorNotUpdatableErr | Mirror configuration can not be updated.
JSStreamMismatchErr | Stream name in subject does not match request.
JSStreamMsgDeleteFailed | Generic message deletion failure error.
JSStreamNameExistErr | Stream name already in use.
JSStreamNotFoundErr | Stream not found.
JSStreamNotMatchErr | Expected stream does not match.
JSStreamReplicasNotUpdatableErr | Replicas configuration can not be updated.
JSStreamRestoreErr | Restore failed.
JSStreamSequenceNotMatchErr | Expected stream sequence does not match.
JSStreamSnapshotErr | Snapshot failed.
JSStreamSubjectOverlapErr | Subjects overlap with an existing stream.
JSStreamTemplateCreateErr | Generic template creation failed.
JSStreamTemplateDeleteErr | Generic stream template deletion failed error.
JSStreamTemplateNotFoundErr | Template not found.
JSStreamUpdateErr | Generic stream update error.
JSStreamWrongLastMsgIDErr | Wrong last msg ID.
JSStreamWrongLastSequenceErr | Wrong last sequence.
JSTempStorageFailedErr | JetStream unable to open temp storage for restore.
JSTemplateNameNotMatchSubjectErr | Template name in subject does not match request.
JSStreamReplicasNotSupportedErr | Replicas > 1 not supported in non-clustered mode.
JSPeerRemapErr | Peer remap failed.
JSNotEnabledErr | JetStream not enabled.
JSStreamStoreFailedErr | Generic error when storing a message failed.
JSConsumerConfigRequiredErr | Consumer config required.
JSConsumerDeliverToWildcardsErr | Consumer deliver subject has wildcards.
JSConsumerPushMaxWaitingErr | Consumer in push mode can not set max waiting.
JSConsumerDeliverCycleErr | Consumer deliver subject forms a cycle.
JSConsumerMaxPendingAckPolicyRequiredErr | Consumer requires ack policy for max ack pending.
JSConsumerSmallHeartbeatErr | Consumer idle heartbeat needs to be >= 100ms.
JSConsumerPullRequiresAckErr | Consumer in pull mode requires explicit ack policy.
JSConsumerPullNotDurableErr | Consumer in pull mode requires a durable name.
JSConsumerPullWithRateLimitErr | Consumer in pull mode can not have rate limit set.
JSConsumerMaxWaitingNegativeErr | Consumer max waiting needs to be positive.
JSConsumerHBRequiresPushErr | Consumer idle heartbeat requires a push based consumer.
JSConsumerFCRequiresPushErr | Consumer flow control requires a push based consumer.
JSConsumerDirectRequiresPushErr | Consumer direct requires a push based consumer.
JSConsumerDirectRequiresEphemeralErr | Consumer direct requires an ephemeral consumer.
JSConsumerOnMappedErr | Consumer direct on a mapped consumer.
JSConsumerFilterNotSubsetErr | Consumer filter subject is not a valid subset of the interest subjects.
JSConsumerInvalidPolicyErr | Generic delivery policy error.
JSConsumerInvalidSamplingErr | Failed to parse consumer sampling configuration.
JSStreamInvalidErr | Stream not valid.
JSConsumerWQRequiresExplicitAckErr | Workqueue stream requires explicit ack.
JSConsumerWQMultipleUnfilteredErr | Multiple non-filtered consumers not allowed on workqueue stream.
JSConsumerWQConsumerNotUniqueErr | Filtered consumer not unique on workqueue stream.
JSConsumerWQConsumerNotDeliverAllErr | Consumer must be deliver all on workqueue stream.
JSConsumerNameTooLongErr | Consumer name is too long.
JSConsumerBadDurableNameErr | Durable name can not contain '.', '*', '>'.
JSConsumerStoreFailedErr | Error creating store for consumer.
JSConsumerExistingActiveErr | Consumer already exists and is still active.
JSConsumerReplacementWithDifferentNameErr | Consumer replacement durable config not the same.
JSConsumerDescriptionTooLongErr | Consumer description is too long.
JSConsumerWithFlowControlNeedsHeartbeatsErr | Consumer with flow control also needs heartbeats.
JSStreamSealedErr | Invalid operation on sealed stream.
JSStreamPurgeFailedErr | Generic stream purge failure.
JSStreamRollupFailedErr | Generic stream rollup failure.
JSConsumerInvalidDeliverSubjectErr | Invalid push consumer deliver subject.
JSStreamMaxBytesRequiredErr | Account requires a stream config to have max bytes set.
JSConsumerMaxRequestBatchNegativeErr | Consumer max request batch needs to be > 0.
JSConsumerMaxRequestExpiresToSmallErr | Consumer max request expires needs to be > 1ms.
JSConsumerMaxDeliverBackoffErr | Max deliver is required to be > length of backoff values.
JSStreamInfoMaxSubjectsErr | Subject details would exceed maximum allowed.
JSStreamOfflineErr | Stream is offline.
JSConsumerOfflineErr | Consumer is offline.
JSNoLimitsErr | No JetStream default or applicable tiered limit present.
JSConsumerMaxPendingAckExcessErr | Consumer max ack pending exceeds system limit.
JSStreamMaxStreamBytesExceededErr | Stream max bytes exceeds account limit max stream bytes.
JSStreamMoveAndScaleErr | Cannot move and scale a stream in a single update.
JSStreamMoveInProgressErr | Stream move already in progress.
JSConsumerMaxRequestBatchExceededErr | Consumer max request batch exceeds server limit.
JSConsumerReplicasExceedsStreamErr | Consumer config replica count exceeds parent stream.
JSConsumerNameContainsPathSeparatorsErr | Consumer name can not contain path separators.
JSStreamNameContainsPathSeparatorsErr | Stream name can not contain path separators.
JSStreamMoveNotInProgressErr | Stream move not in progress.
JSStreamNameExistRestoreFailedErr | Stream name already in use, cannot restore.
JSConsumerCreateFilterSubjectMismatchErr | Consumer create request did not match filtered subject from create subject.
JSConsumerCreateDurableAndNameMismatchErr | Consumer Durable and Name have to be equal if both are provided.
JSReplicasCountCannotBeNegativeErr | Replicas count cannot be negative.