NATS C Client with JetStream and Streaming support  3.8.0
The nats.io C Client, Supported by Synadia Communications Inc.
Loading...
Searching...
No Matches
status.h
Go to the documentation of this file.
1// Copyright 2015-2022 The NATS Authors
2// Licensed under the Apache License, Version 2.0 (the "License");
3// you may not use this file except in compliance with the License.
4// You may obtain a copy of the License at
5//
6// http://www.apache.org/licenses/LICENSE-2.0
7//
8// Unless required by applicable law or agreed to in writing, software
9// distributed under the License is distributed on an "AS IS" BASIS,
10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11// See the License for the specific language governing permissions and
12// limitations under the License.
13
14#ifndef STATUS_H_
15#define STATUS_H_
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21
23typedef enum
24{
25#if defined(NATS_CONN_STATUS_NO_PREFIX)
26 // This is deprecated and applications referencing connection
27 // status should be updated to use the values prefixed with NATS_CONN_STATUS_.
28
29 DISCONNECTED = 0,
30 CONNECTING,
31 CONNECTED,
32 CLOSED,
33 RECONNECTING,
34 DRAINING_SUBS,
35 DRAINING_PUBS,
36#else
44#endif
45
47
134
135typedef enum {
136
268
269} jsErrCode;
270
271#ifdef __cplusplus
272}
273#endif
274
275#endif /* STATUS_H_ */
jsErrCode
Definition status.h:135
@ JSConsumerWQConsumerNotDeliverAllErr
Consumer must be deliver all on workqueue stream.
Definition status.h:235
@ JSNoMessageFoundErr
No message found.
Definition status.h:172
@ JSConsumerReplacementWithDifferentNameErr
Consumer replacement durable config not the same.
Definition status.h:240
@ JSStreamInvalidConfig
Stream configuration validation error.
Definition status.h:187
@ JSMirrorWithSubjectsErr
Stream mirrors can not also contain subjects.
Definition status.h:169
@ JSReplicasCountCannotBeNegativeErr
Replicas count cannot be negative.
Definition status.h:267
@ JSConsumerFilterNotSubsetErr
Consumer filter subject is not a valid subset of the interest subjects.
Definition status.h:228
@ JSConsumerEphemeralWithDurableNameErr
Consumer expected to be ephemeral but a durable name was set in request.
Definition status.h:155
@ JSConsumerDurableNameNotMatchSubjectErr
Consumer name in subject does not match durable name in request.
Definition status.h:152
@ JSConsumerReplicasExceedsStreamErr
Consumer config replica count exceeds parent stream.
Definition status.h:260
@ JSSequenceNotFoundErr
Sequence not found.
Definition status.h:178
@ JSStreamTemplateCreateErr
Generic template creation failed.
Definition status.h:201
@ JSStreamAssignmentErr
Generic stream assignment error.
Definition status.h:183
@ JSAccountResourcesExceededErr
Resource limits exceeded for account.
Definition status.h:137
@ JSConsumerMaxWaitingNegativeErr
Consumer max waiting needs to be positive.
Definition status.h:222
@ JSConsumerStoreFailedErr
Error creating store for consumer.
Definition status.h:238
@ JSConsumerPullWithRateLimitErr
Consumer in pull mode can not have rate limit set.
Definition status.h:221
@ JSStorageResourcesExceededErr
Insufficient storage resources available.
Definition status.h:182
@ JSConsumerCreateDurableAndNameMismatchErr
Consumer Durable and Name have to be equal if both are provided.
Definition status.h:266
@ JSClusterNotLeaderErr
JetStream cluster can not handle request.
Definition status.h:144
@ JSStreamPurgeFailedErr
Generic stream purge failure.
Definition status.h:244
@ JSStreamTemplateNotFoundErr
Template not found.
Definition status.h:203
@ JSStreamExternalApiOverlapErr
Stream external api prefix must not overlap.
Definition status.h:156
@ JSConsumerNameTooLongErr
Consumer name is too long.
Definition status.h:236
@ JSStreamSubjectOverlapErr
Subjects overlap with an existing stream.
Definition status.h:200
@ JSConsumerPullNotDurableErr
Consumer in pull mode requires a durable name.
Definition status.h:220
@ JSConsumerMaxPendingAckPolicyRequiredErr
Consumer requires ack policy for max ack pending.
Definition status.h:217
@ JSClusterRequiredErr
JetStream clustering support required.
Definition status.h:145
@ JSConsumerDeliverToWildcardsErr
Consumer deliver subject has wildcards.
Definition status.h:214
@ JSStreamUpdateErr
Generic stream update error.
Definition status.h:204
@ JSRestoreSubscribeFailedErr
JetStream unable to subscribe to restore snapshot.
Definition status.h:177
@ JSConsumerConfigRequiredErr
Consumer config required.
Definition status.h:213
@ JSClusterNotAvailErr
JetStream system temporarily unavailable.
Definition status.h:143
@ JSPeerRemapErr
Peer remap failed.
Definition status.h:210
@ JSConsumerEphemeralWithDurableInSubjectErr
Consumer expected to be ephemeral but detected a durable name set in subject.
Definition status.h:154
@ JSStreamLimitsErr
General stream limits exceeded error.
Definition status.h:188
@ JSConsumerNameExistErr
Consumer name already in use.
Definition status.h:148
@ JSInvalidJSONErr
Invalid JSON.
Definition status.h:160
@ JSStreamTemplateDeleteErr
Generic stream template deletion failed error.
Definition status.h:202
@ JSStreamMessageExceedsMaximumErr
Message size exceeds maximum allowed.
Definition status.h:189
@ JSStreamMirrorNotUpdatableErr
Mirror configuration can not be updated.
Definition status.h:190
@ JSConsumerFCRequiresPushErr
Consumer flow control requires a push based consumer.
Definition status.h:224
@ JSStreamMoveAndScaleErr
Cannot move and scale a stream in a single update.
Definition status.h:257
@ JSStreamReplicasNotUpdatableErr
Replicas configuration can not be updated.
Definition status.h:196
@ JSConsumerMaxRequestBatchExceededErr
Consumer max request batch exceeds server limit.
Definition status.h:259
@ JSConsumerWQConsumerNotUniqueErr
Filtered consumer not unique on workqueue stream.
Definition status.h:234
@ JSMirrorWithStartSeqAndTimeErr
Stream mirrors can not have both start seq and start time configured.
Definition status.h:167
@ JSStreamMaxStreamBytesExceededErr
Stream max bytes exceeds account limit max stream bytes.
Definition status.h:256
@ JSConsumerDirectRequiresEphemeralErr
Consumer direct requires an ephemeral consumer.
Definition status.h:226
@ JSStreamMaxBytesRequiredErr
Account requires a stream config to have max bytes set.
Definition status.h:247
@ JSStreamSequenceNotMatchErr
Expected stream sequence does not match.
Definition status.h:198
@ JSClusterTagsErr
Tags placement not supported for operation.
Definition status.h:146
@ JSStreamNotFoundErr
Stream not found.
Definition status.h:194
@ JSStreamNameContainsPathSeparatorsErr
Stream name can not contain path separators.
Definition status.h:262
@ JSStreamNotMatchErr
Expected stream does not match.
Definition status.h:195
@ JSConsumerOnMappedErr
Consumer direct on a mapped consumer.
Definition status.h:227
@ JSConsumerHBRequiresPushErr
Consumer idle heartbeat requires a push based consumer.
Definition status.h:223
@ JSMaximumStreamsLimitErr
Maximum number of streams reached.
Definition status.h:162
@ JSConsumerWQRequiresExplicitAckErr
Workqueue stream requires explicit ack.
Definition status.h:232
@ JSStreamInvalidExternalDeliverySubjErr
Stream external delivery prefix must not contain wildcards.
Definition status.h:159
@ JSConsumerWQMultipleUnfilteredErr
Multiple non-filtered consumers not allowed on workqueue stream.
Definition status.h:233
@ JSStreamInfoMaxSubjectsErr
Subject details would exceed maximum allowed.
Definition status.h:251
@ JSStreamOfflineErr
Stream is offline.
Definition status.h:252
@ JSConsumerInvalidPolicyErr
Generic delivery policy error.
Definition status.h:229
@ JSStreamMismatchErr
Stream name in subject does not match request.
Definition status.h:191
@ JSClusterUnSupportFeatureErr
Not currently supported in clustered mode.
Definition status.h:171
@ JSStreamDeleteErr
General stream deletion error.
Definition status.h:185
@ JSConsumerExistingActiveErr
Consumer already exists and is still active.
Definition status.h:239
@ JSStreamCreateErr
Generic stream creation error.
Definition status.h:184
@ JSStreamReplicasNotSupportedErr
Replicas > 1 not supported in non-clustered mode.
Definition status.h:209
@ JSMirrorMaxMessageSizeTooBigErr
Stream mirror must have max message size >= source.
Definition status.h:165
@ JSConsumerPushMaxWaitingErr
Consumer in push mode can not set max waiting.
Definition status.h:215
@ JSNoAccountErr
Account not found.
Definition status.h:170
@ JSConsumerSmallHeartbeatErr
Consumer idle heartbeat needs to be >= 100ms.
Definition status.h:218
@ JSMirrorConsumerSetupFailedErr
Generic mirror consumer setup failure.
Definition status.h:164
@ JSConsumerDirectRequiresPushErr
Consumer direct requires a push based consumer.
Definition status.h:225
@ JSStreamNameExistRestoreFailedErr
Stream name already in use, cannot restore.
Definition status.h:264
@ JSClusterNotAssignedErr
JetStream cluster not assigned to this server.
Definition status.h:142
@ JSStreamSealedErr
Invalid operation on sealed stream.
Definition status.h:243
@ JSConsumerMaxRequestExpiresToSmallErr
Consumer max request expires needs to be > 1ms.
Definition status.h:249
@ JSConsumerDurableNameNotSetErr
Consumer expected to be durable but a durable name was not set.
Definition status.h:153
@ JSConsumerNotFoundErr
Consumer not found.
Definition status.h:149
@ JSRaftGeneralErr
General RAFT error.
Definition status.h:176
@ JSConsumerBadDurableNameErr
Durable name can not contain '.', '*', '>'.
Definition status.h:237
@ JSConsumerOfflineErr
Consumer is offline.
Definition status.h:253
@ JSConsumerInvalidDeliverSubjectErr
Invalid push consumer deliver subject.
Definition status.h:246
@ JSMaximumConsumersLimitErr
Maximum consumers exceeds account limit.
Definition status.h:161
@ JSNotEnabledForAccountErr
JetStream not enabled for account.
Definition status.h:174
@ JSStreamWrongLastSequenceErr
Wrong last sequence.
Definition status.h:206
@ JSMirrorWithSourcesErr
Stream mirrors can not also contain other sources.
Definition status.h:166
@ JSConsumerNameContainsPathSeparatorsErr
Consumer name can not contain path separators.
Definition status.h:261
@ JSConsumerCreateFilterSubjectMismatchErr
Consumer create request did not match filtered subject from create subject.
Definition status.h:265
@ JSClusterServerNotMemberErr
Server is not a member of the cluster.
Definition status.h:179
@ JSConsumerInvalidSamplingErr
Failed to parse consumer sampling configuration.
Definition status.h:230
@ JSConsumerDescriptionTooLongErr
Consumer description is too long.
Definition status.h:241
@ JSNotEmptyRequestErr
Expected an empty request payload.
Definition status.h:173
@ JSStreamMsgDeleteFailed
Generic message deletion failure error.
Definition status.h:192
@ JSStreamRestoreErr
Restore failed.
Definition status.h:197
@ JSStreamStoreFailedErr
Generic error when storing a message failed.
Definition status.h:212
@ JSTemplateNameNotMatchSubjectErr
Template name in subject does not match request.
Definition status.h:208
@ JSConsumerWithFlowControlNeedsHeartbeatsErr
Consumer with flow control also needs heartbeats.
Definition status.h:242
@ JSStreamGeneralError
General stream failure.
Definition status.h:186
@ JSConsumerMaxRequestBatchNegativeErr
Consumer max request batch needs to be > 0.
Definition status.h:248
@ JSConsumerPullRequiresAckErr
Consumer in pull mode requires explicit ack policy.
Definition status.h:219
@ JSStreamMoveNotInProgressErr
Stream move not in progress.
Definition status.h:263
@ JSStreamMoveInProgressErr
Stream move already in progress.
Definition status.h:258
@ JSStreamSnapshotErr
Snapshot failed.
Definition status.h:199
@ JSConsumerMaxPendingAckExcessErr
Consumer max ack pending exceeds system limit.
Definition status.h:255
@ JSSourceMaxMessageSizeTooBigErr
Stream source must have max message size >= target.
Definition status.h:181
@ JSBadRequestErr
Bad request.
Definition status.h:138
@ JSNoLimitsErr
No JetStream default or applicable tiered limit present.
Definition status.h:254
@ JSTempStorageFailedErr
JetStream unable to open temp storage for restore.
Definition status.h:207
@ JSInsufficientResourcesErr
Insufficient resources.
Definition status.h:158
@ JSStreamWrongLastMsgIDErr
Wrong last msg ID.
Definition status.h:205
@ JSMemoryResourcesExceededErr
Insufficient memory resources available.
Definition status.h:163
@ JSSnapshotDeliverSubjectInvalidErr
Deliver subject not valid.
Definition status.h:150
@ JSClusterPeerNotMemberErr
Peer not a member.
Definition status.h:175
@ JSClusterNoPeersErr
No suitable peers for placement.
Definition status.h:140
@ JSStreamExternalDelPrefixOverlapsErr
Stream external delivery prefix overlaps with stream subject.
Definition status.h:157
@ JSClusterIncompleteErr
Incomplete results.
Definition status.h:139
@ JSSourceConsumerSetupFailedErr
General source consumer setup failure.
Definition status.h:180
@ JSStreamInvalidErr
Stream not valid.
Definition status.h:231
@ JSClusterNotActiveErr
JetStream not in clustered mode.
Definition status.h:141
@ JSStreamNameExistErr
Stream name already in use.
Definition status.h:193
@ JSConsumerMaxDeliverBackoffErr
Max deliver is required to be > length of backoff values.
Definition status.h:250
@ JSConsumerCreateErr
General consumer creation failure string.
Definition status.h:147
@ JSConsumerDeliverCycleErr
Consumer deliver subject forms a cycle.
Definition status.h:216
@ JSMirrorWithSubjectFiltersErr
Stream mirrors can not contain filtered subjects.
Definition status.h:168
@ JSNotEnabledErr
JetStream not enabled.
Definition status.h:211
@ JSConsumerDurableNameNotInSubjectErr
Consumer expected to be durable but no durable name set in subject.
Definition status.h:151
@ JSStreamRollupFailedErr
Generic stream rollup failure.
Definition status.h:245
natsStatus
Status returned by most of the APIs.
Definition status.h:50
@ NATS_DRAINING
Definition status.h:122
@ NATS_SECURE_CONNECTION_WANTED
Definition status.h:66
@ NATS_PROTOCOL_ERROR
Definition status.h:54
@ NATS_MISMATCH
For JetStream subscriptions, it means that a consumer sequence mismatch was discovered.
Definition status.h:129
@ NATS_INVALID_SUBSCRIPTION
Definition status.h:84
@ NATS_INSUFFICIENT_BUFFER
A buffer is not large enough to accommodate the data.
Definition status.h:100
@ NATS_MISSED_HEARTBEAT
For JetStream subscriptions, it means that the library detected that server heartbeats have been miss...
Definition status.h:131
@ NATS_ERR
Generic error.
Definition status.h:53
@ NATS_IO_ERROR
IO Error (network communication).
Definition status.h:56
@ NATS_NO_SERVER
Definition status.h:62
@ NATS_CONNECTION_AUTH_FAILED
The connection failed due to authentication error.
Definition status.h:72
@ NATS_CONNECTION_CLOSED
Definition status.h:60
@ NATS_NOT_YET_CONNECTED
Definition status.h:118
@ NATS_NO_MEMORY
Definition status.h:102
@ NATS_INVALID_ARG
Definition status.h:81
@ NATS_INVALID_SUBJECT
Invalid subject, for instance NULL or empty string.
Definition status.h:80
@ NATS_FAILED_TO_INITIALIZE
The library failed to initialize.
Definition status.h:110
@ NATS_INVALID_TIMEOUT
Timeout must be positive numbers.
Definition status.h:86
@ NATS_LINE_TOO_LONG
Definition status.h:57
@ NATS_SSL_ERROR
Definition status.h:113
@ NATS_INVALID_QUEUE_NAME
An invalid queue name was passed when creating a queue subscription.
Definition status.h:125
@ NATS_NO_SERVER_SUPPORT
The server does not support this action.
Definition status.h:116
@ NATS_SYS_ERROR
Some system function returned an error.
Definition status.h:105
@ NATS_MAX_DELIVERED_MSGS
Definition status.h:97
@ NATS_ILLEGAL_STATE
Definition status.h:88
@ NATS_OK
Success.
Definition status.h:51
@ NATS_STALE_CONNECTION
Definition status.h:64
@ NATS_NO_RESPONDERS
No responders were running when the server received the request.
Definition status.h:127
@ NATS_TIMEOUT
Definition status.h:107
@ NATS_SECURE_CONNECTION_REQUIRED
The server expects a TLS connection.
Definition status.h:68
@ NATS_CONNECTION_DISCONNECTED
Definition status.h:69
@ NATS_NOT_PERMITTED
The action is not permitted.
Definition status.h:73
@ NATS_NOT_FOUND
Definition status.h:74
@ NATS_ADDRESS_MISSING
Definition status.h:77
@ NATS_NOT_INITIALIZED
The library is not yet initialized.
Definition status.h:111
@ NATS_SLOW_CONSUMER
Definition status.h:92
@ NATS_MAX_PAYLOAD
Definition status.h:95
natsConnStatus
The connection state.
Definition status.h:24
@ NATS_CONN_STATUS_DISCONNECTED
The connection has been disconnected.
Definition status.h:37
@ NATS_CONN_STATUS_CONNECTED
The connection is connected.
Definition status.h:39
@ NATS_CONN_STATUS_CONNECTING
The connection is in the process or connecting.
Definition status.h:38
@ NATS_CONN_STATUS_CLOSED
The connection is closed.
Definition status.h:40
@ NATS_CONN_STATUS_DRAINING_SUBS
The connection is draining subscriptions.
Definition status.h:42
@ NATS_CONN_STATUS_DRAINING_PUBS
The connection is draining publishers.
Definition status.h:43
@ NATS_CONN_STATUS_RECONNECTING
The connection is in the process or reconnecting.
Definition status.h:41