-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathdefinitions.json
1277 lines (1277 loc) · 42.4 KB
/
definitions.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://nats.io/schemas/jetstream/api/v1/definitions.json",
"title": "io.nats.jetstream.api.v1.definitions",
"description": "Shared definitions for the JetStream API",
"type": "object",
"definitions": {
"golang_duration_nanos": {
"$comment": "nanoseconds depicting a duration in time, signed 64 bit integer",
"$ref": "#/definitions/golang_int64"
},
"golang_int": {
"$comment": "integer with a dynamic bit size depending on the platform the cluster runs on, can be up to 64bit",
"$ref": "#/definitions/golang_int64"
},
"golang_uint64": {
"$comment": "unsigned 64 bit integer",
"type": "integer",
"minimum": 0,
"maximum": 18446744073709551615
},
"golang_int32": {
"$comment": "signed 32 bit integer",
"type": "integer",
"maximum": 2147483647,
"minimum": -2147483648
},
"golang_int64": {
"$comment": "signed 64 bit integer",
"type": "integer",
"maximum": 9223372036854775807,
"minimum": -9223372036854775808
},
"golang_time": {
"$comment": "A point in time in RFC3339 format including timezone, though typically in UTC",
"type": "string",
"format": "date-time"
},
"stream_source": {
"type": "object",
"description": "Defines a source where streams should be replicated from",
"required": ["name"],
"properties": {
"name": {
"description": "Stream name",
"$ref": "#/definitions/basic_name"
},
"opt_start_seq": {
"description": "Sequence to start replicating from",
"$ref": "#/definitions/golang_uint64"
},
"opt_start_time": {
"description": "Time stamp to start replicating from",
"$ref": "#/definitions/golang_time"
},
"filter_subject": {
"description": "Replicate only a subset of messages based on filter",
"type": "string"
},
"subject_transforms": {
"type": ["array","null"],
"description": "The subject filtering sources and associated destination transforms",
"items": {
"$ref": "#/definitions/subject_transform",
"minimum": 0
}
},
"external": {
"$ref": "#/definitions/external_stream_source"
}
}
},
"priority_group_state": {
"required": ["group"],
"type": "object",
"description": "Status of a specific consumer priority group",
"properties": {
"group": {
"type": "string",
"description": "The group this status is for",
"minLength": 1
},
"pinned_client_id": {
"type": "string",
"description": "The generated ID of the pinned client"
},
"pinned_ts": {
"description": "The timestamp when the client was pinned",
"$ref": "#/definitions/golang_time"
}
}
},
"external_stream_source": {
"required": ["api"],
"type": "object",
"description": "Configuration referencing a stream source in another account or JetStream domain",
"properties": {
"api": {
"type": "string",
"description": "The subject prefix that imports the other account/domain $JS.API.CONSUMER.> subjects"
},
"deliver": {
"type": "string",
"description": "The delivery subject to use for the push consumer"
}
}
},
"stream_source_info": {
"required": ["name","lag","active"],
"type": "object",
"description": "Information about an upstream stream source in a mirror",
"properties": {
"name": {
"type": "string",
"description": "The name of the Stream being replicated"
},
"filter_subject": {
"type": "string",
"description": "The subject filter to apply to the messages"
},
"subject_transforms": {
"type": ["array","null"],
"description": "The subject filtering sources and associated destination transforms",
"items": {
"$ref": "#/definitions/subject_transform",
"minimum": 0
}
},
"lag": {
"$ref": "#/definitions/golang_uint64",
"description": "How many messages behind the mirror operation is",
"minimum": 0
},
"active": {
"description": "When last the mirror had activity, in nanoseconds. Value will be -1 when there has been no activity.",
"$ref": "#/definitions/golang_duration_nanos",
"minimum": -1
},
"external": {
"$ref": "#/definitions/external_stream_source"
},
"error": {
"$ref": "#/definitions/api_error"
}
}
},
"lost_stream_data": {
"type": "object",
"description": "Records messages that were damaged and unrecoverable",
"properties": {
"msgs": {
"type": ["array","null"],
"description": "The messages that were lost",
"items": {
"$ref": "#/definitions/golang_uint64",
"minimum": 0
}
},
"bytes": {
"description": "The number of bytes that were lost",
"$ref": "#/definitions/golang_uint64"
}
}
},
"placement": {
"type": "object",
"description": "Placement requirements for a Stream or asset leader",
"properties": {
"cluster": {
"type": "string",
"description": "The desired cluster name"
},
"tags": {
"description": "Tags required on servers hosting this stream or leader",
"type": "array",
"items": {
"type": "string"
}
},
"preferred": {
"description": "A preferred server name to move the leader to",
"type": "string"
}
}
},
"peer_info": {
"type": "object",
"required": ["name", "current", "active"],
"properties": {
"name": {
"description": "The server name of the peer",
"type": "string",
"minimum": 1
},
"current": {
"description": "Indicates if the server is up to date and synchronised",
"type": "boolean",
"default": false
},
"observer": {
"description": "Indicates if the server is running as an observer only",
"type": "boolean",
"default": false
},
"active": {
"description": "Nanoseconds since this peer was last seen",
"type": "number"
},
"offline": {
"description": "Indicates the node is considered offline by the group",
"type": "boolean",
"default": false
},
"lag": {
"description": "How many uncommitted operations this peer is behind the leader",
"type": "integer",
"minimum": 0
}
}
},
"cluster_info": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The cluster name"
},
"leader": {
"type": "string",
"description": "The server name of the RAFT leader"
},
"replicas": {
"type": "array",
"description": "The members of the RAFT cluster",
"items": {
"$ref": "#/definitions/peer_info"
}
},
"raft_group": {
"type": "string",
"description": "In clustered environments the name of the Raft group managing the asset"
}
}
},
"api_stats": {
"type": "object",
"required": ["total", "errors"],
"properties": {
"total": {
"description": "Total number of API requests received for this account",
"minimum": 0,
"type": "integer"
},
"errors": {
"description": "API requests that resulted in an error response",
"minimum": 0,
"type": "integer"
}
}
},
"tier": {
"type": "object",
"required": [
"memory",
"storage",
"streams",
"limits",
"consumers"
],
"properties": {
"memory": {
"description": "Memory Storage being used for Stream Message storage",
"type": "integer",
"minimum": 0
},
"storage": {
"description": "File Storage being used for Stream Message storage",
"type": "integer",
"minimum": 0
},
"reserved_memory": {
"description": "Bytes that is reserved for memory usage by this account on the server",
"type": "integer",
"minimum": 0
},
"reserved_storage": {
"description": "Bytes that is reserved for disk usage by this account on the server",
"type": "integer",
"minimum": 0
},
"streams": {
"description": "Number of active Streams",
"type": "integer",
"minimum": 0
},
"consumers": {
"description": "Number of active Consumers",
"type": "integer",
"minimum": 0
},
"limits": {
"$ref": "#/definitions/account_limits"
}
}
},
"account_stats": {
"type": "object",
"required": ["memory", "storage", "streams", "limits", "api", "consumers"],
"properties": {
"memory": {
"description": "Memory Storage being used for Stream Message storage",
"type": "integer",
"minimum": 0
},
"storage": {
"description": "File Storage being used for Stream Message storage",
"type": "integer",
"minimum": 0
},
"streams": {
"description": "Number of active Streams",
"type": "integer",
"minimum": 0
},
"consumers": {
"description": "Number of active Consumers",
"type": "integer",
"minimum": 0
},
"domain": {
"description": "The JetStream domain this account is in",
"type": "string"
},
"limits": {
"$ref": "#/definitions/account_limits"
},
"tiers": {
"type": "object",
"patternProperties": {
".*": {
"$ref": "#/definitions/tier"
}
}
},
"api": {
"$ref": "#/definitions/api_stats"
}
}
},
"account_limits": {
"type": "object",
"additionalProperties": false,
"required": ["max_consumers", "max_memory", "max_storage", "max_streams"],
"properties": {
"max_memory": {
"type": "integer",
"description": "The maximum amount of Memory storage Stream Messages may consume",
"minimum": -1
},
"max_storage": {
"type": "integer",
"description": "The maximum amount of File storage Stream Messages may consume",
"minimum": -1
},
"max_streams": {
"type": "integer",
"description": "The maximum number of Streams an account can create",
"minimum": -1
},
"max_consumers": {
"type": "integer",
"description": "The maximum number of Consumer an account can create",
"minimum": -1
},
"max_bytes_required": {
"type": "boolean",
"description": "Indicates if Streams created in this account requires the max_bytes property set",
"default": false
},
"max_ack_pending": {
"type": "integer",
"description": "The maximum number of outstanding ACKs any consumer may configure"
},
"memory_max_stream_bytes": {
"type": "integer",
"description": "The maximum size any single memory stream may be",
"minimum": -1,
"default": -1
},
"storage_max_stream_bytes": {
"type": "integer",
"description": "The maximum size any single storage based stream may be",
"minimum": -1,
"default": -1
}
}
},
"stored_message": {
"type": "object",
"additionalProperties": false,
"required": ["subject", "seq", "time"],
"properties": {
"subject": {
"type": "string",
"description": "The subject the message was originally received on",
"minLength": 1
},
"seq": {
"description": "The sequence number of the message in the Stream",
"$ref": "#/definitions/golang_uint64"
},
"data": {
"type": "string",
"description": "The base64 encoded payload of the message body",
"minLength": 0
},
"time": {
"type": "string",
"description": "The time the message was received"
},
"hdrs": {
"type": "string",
"description": "Base64 encoded headers for the message"
}
}
},
"iterable_request": {
"type": "object",
"additionalProperties": false,
"required": ["offset"],
"properties": {
"offset": {
"type": "integer",
"minimum": 0
}
}
},
"iterable_response": {
"type": "object",
"required": ["total", "offset", "limit"],
"properties": {
"total": {
"type": "integer",
"minimum": 0
},
"offset": {
"type": "integer",
"minimum": 0
},
"limit": {
"type": "integer",
"minimum": 0
}
}
},
"error_response": {
"type": "object",
"required": ["error"],
"properties": {
"error": {
"$ref": "#/definitions/api_error"
}
}
},
"api_error": {
"type": "object",
"required": ["code"],
"properties": {
"code": {
"type": "integer",
"description": "HTTP like error code in the 300 to 500 range",
"minimum": 300,
"maximum": 699
},
"description": {
"type": "string",
"description": "A human friendly description of the error"
},
"err_code": {
"type": "integer",
"description": "The NATS error code unique to each kind of error",
"minimum": 0,
"maximum": 65535
}
}
},
"basic_name": {
"type": "string",
"pattern": "^[^.*>]+$",
"minLength": 1
},
"priority_policy": {
"type": "string",
"enum": ["none","overflow","pinned_client"]
},
"deliver_policy": {
"oneOf": [
{"$ref": "#/definitions/all_deliver_policy"},
{"$ref": "#/definitions/last_deliver_policy"},
{"$ref": "#/definitions/new_deliver_policy"},
{"$ref": "#/definitions/start_sequence_deliver_policy"},
{"$ref": "#/definitions/start_time_deliver_policy"},
{"$ref": "#/definitions/last_per_subject_deliver_policy"}
]
},
"all_deliver_policy": {
"required": ["deliver_policy"],
"properties": {
"deliver_policy": {
"type": "string",
"enum": ["all"]
}
}
},
"last_deliver_policy": {
"required": ["deliver_policy"],
"properties": {
"deliver_policy": {
"type": "string",
"enum": ["last"]
}
}
},
"new_deliver_policy": {
"required": ["deliver_policy"],
"properties": {
"deliver_policy": {
"type": "string",
"enum": ["new"]
}
}
},
"start_sequence_deliver_policy": {
"required": ["deliver_policy", "opt_start_seq"],
"properties": {
"deliver_policy": {
"type": "string",
"enum": ["by_start_sequence"]
},
"opt_start_seq": {
"$ref": "#/definitions/golang_uint64",
"minimum": 0
}
}
},
"start_time_deliver_policy": {
"required": ["deliver_policy", "opt_start_time"],
"properties": {
"deliver_policy": {
"type": "string",
"enum": ["by_start_time"]
},
"opt_start_time": {
"$ref": "#/definitions/golang_time"
}
}
},
"last_per_subject_deliver_policy": {
"required": ["deliver_policy"],
"properties": {
"deliver_policy": {
"type": "string",
"enum": ["last_per_subject"]
}
}
},
"stream_consumer_limits": {
"type": "object",
"properties": {
"inactive_threshold": {
"description": "Maximum value for inactive_threshold for consumers of this stream. Acts as a default when consumers do not set this value.",
"$ref": "#/definitions/golang_duration_nanos"
},
"max_ack_pending": {
"description": "Maximum value for max_ack_pending for consumers of this stream. Acts as a default when consumers do not set this value.",
"$ref": "#/definitions/golang_int"
}
}
},
"sequence_info": {
"type": "object",
"additionalProperties": false,
"required": ["consumer_seq", "stream_seq"],
"properties": {
"consumer_seq": {
"$ref": "#/definitions/golang_uint64",
"description": "The sequence number of the Consumer"
},
"stream_seq": {
"$ref": "#/definitions/golang_uint64",
"description": "The sequence number of the Stream"
},
"last_active": {
"description": "The last time a message was delivered or acknowledged (for ack_floor)",
"$ref": "#/definitions/golang_time"
}
}
},
"sequence_pair": {
"type": "object",
"additionalProperties": false,
"required": ["consumer_seq", "stream_seq"],
"properties": {
"consumer_seq": {
"$ref": "#/definitions/golang_uint64",
"description": "The sequence number of the Consumer"
},
"stream_seq": {
"$ref": "#/definitions/golang_uint64",
"description": "The sequence number of the Stream"
}
}
},
"consumer_info": {
"required": ["stream_name", "name", "config", "created", "delivered", "ack_floor", "num_ack_pending", "num_redelivered", "num_waiting", "num_pending"],
"type": "object",
"properties": {
"stream_name": {
"type": "string",
"description": "The Stream the consumer belongs to"
},
"name": {
"type": "string",
"description": "A unique name for the consumer, either machine generated or the durable name"
},
"ts": {
"description": "The server time the consumer info was created",
"$ref": "#/definitions/golang_time"
},
"config": {
"$ref": "#/definitions/consumer_configuration"
},
"created": {
"description": "The time the Consumer was created",
"$ref": "#/definitions/golang_time"
},
"delivered": {
"description": "The last message delivered from this Consumer",
"$ref": "#/definitions/sequence_info"
},
"ack_floor": {
"description": "The highest contiguous acknowledged message",
"$ref": "#/definitions/sequence_info"
},
"num_ack_pending": {
"description": "The number of messages pending acknowledgement",
"$ref": "#/definitions/golang_int",
"minimum": 0
},
"num_redelivered": {
"description": "The number of redeliveries that have been performed",
"$ref": "#/definitions/golang_int",
"minimum": 0
},
"num_waiting": {
"description": "The number of pull consumers waiting for messages",
"$ref": "#/definitions/golang_int",
"minimum": 0
},
"num_pending": {
"description": "The number of messages left unconsumed in this Consumer",
"$ref": "#/definitions/golang_uint64",
"minimum": 0
},
"cluster": {
"$ref": "#/definitions/cluster_info"
},
"push_bound": {
"description": "Indicates if any client is connected and receiving messages from a push consumer",
"type": "boolean"
},
"paused": {
"description": "Indicates if the consumer is currently in a paused state",
"type": "boolean"
},
"pause_until": {
"description": "A deadline time for when the consumer will be paused. Only usable if 'paused' is true",
"$ref": "#/definitions/golang_time"
},
"priority_groups": {
"description": "The state of Priority Groups",
"type": "array",
"items": {
"$ref": "#/definitions/priority_group_state"
}
}
}
},
"consumer_configuration": {
"required":[],
"allOf": [{"$ref": "#/definitions/deliver_policy"}],
"properties": {
"durable_name": {
"description": "A unique name for a durable consumer",
"deprecationMessage": "Durable is deprecated. All consumers will have names. picked by clients.",
"$ref": "#/definitions/basic_name"
},
"name": {
"description": "A unique name for a consumer",
"$ref": "#/definitions/basic_name"
},
"description": {
"description": "A short description of the purpose of this consumer",
"type": "string",
"maxLength": 4096
},
"deliver_policy": {
"description": "The point in the stream from which to receive messages",
"type": "string",
"enum": ["all", "last", "new", "by_start_sequence", "by_start_time", "last_per_subject"],
"default": "all"
},
"deliver_subject": {
"description": "The subject push consumers delivery messages to",
"type": "string",
"minLength": 1
},
"deliver_group": {
"description": "The queue group name used to distribute messages among subscribers",
"type": "string",
"minLength": 1
},
"ack_policy": {
"description": "The requirement of client acknowledgments",
"type": "string",
"enum": ["none", "all", "explicit"],
"default": "none"
},
"ack_wait": {
"description": "How long (in nanoseconds) to allow messages to remain un-acknowledged before attempting redelivery",
"$ref": "#/definitions/golang_duration_nanos",
"minimum": 1,
"default": "30000000000"
},
"max_deliver": {
"$ref": "#/definitions/golang_int",
"description": "The number of times a message will be delivered to consumers if not acknowledged in time",
"default": -1
},
"filter_subject": {
"description": "Filter the stream by a single subjects",
"type": "string"
},
"filter_subjects": {
"description": "Filter the stream by multiple subjects",
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"replay_policy": {
"description": "The rate at which messages will be pushed to a client",
"type": "string",
"enum": ["instant", "original"],
"default": "instant"
},
"sample_freq": {
"description": "Sets the percentage of acknowledgments that should be sampled for observability",
"type": "string"
},
"rate_limit_bps": {
"$ref": "#/definitions/golang_uint64",
"description": "The rate at which messages will be delivered to clients, expressed in bit per second",
"minimum": 0
},
"max_ack_pending": {
"$ref": "#/definitions/golang_int",
"description": "The maximum number of messages without acknowledgement that can be outstanding, once this limit is reached message delivery will be suspended",
"default": 1000
},
"idle_heartbeat": {
"$ref": "#/definitions/golang_duration_nanos",
"minimum": 0,
"description": "If the Consumer is idle for more than this many nano seconds a empty message with Status header 100 will be sent indicating the consumer is still alive"
},
"flow_control": {
"type": "boolean",
"description": "For push consumers this will regularly send an empty mess with Status header 100 and a reply subject, consumers must reply to these messages to control the rate of message delivery"
},
"max_waiting": {
"$ref": "#/definitions/golang_int",
"description": "The number of pulls that can be outstanding on a pull consumer, pulls received after this is reached are ignored",
"minimum": 0,
"default": 512
},
"direct": {
"type": "boolean",
"description": "Creates a special consumer that does not touch the Raft layers, not for general use by clients, internal use only",
"default": false
},
"headers_only": {
"type": "boolean",
"default": false,
"description": "Delivers only the headers of messages in the stream and not the bodies. Additionally adds Nats-Msg-Size header to indicate the size of the removed payload"
},
"max_batch": {
"type": "integer",
"description": "The largest batch property that may be specified when doing a pull on a Pull Consumer",
"default": 0
},
"max_expires": {
"description": "The maximum expires value that may be set when doing a pull on a Pull Consumer",
"$ref": "#/definitions/golang_duration_nanos",
"default": 0
},
"max_bytes": {
"description": "The maximum bytes value that maybe set when dong a pull on a Pull Consumer",
"$ref": "definitions.json#/definitions/golang_int",
"minimum": 0,
"default": 0
},
"inactive_threshold": {
"description": "Duration that instructs the server to cleanup ephemeral consumers that are inactive for that long",
"$ref": "#/definitions/golang_duration_nanos",
"default": 0
},
"backoff": {
"description": "List of durations in Go format that represents a retry time scale for NaK'd messages",
"type": "array",
"items": {
"$ref": "#/definitions/golang_duration_nanos"
}
},
"num_replicas": {
"description": "When set do not inherit the replica count from the stream but specifically set it to this amount",
"type": "integer",
"$ref": "#/definitions/golang_int",
"minimum": 0,
"maximum": 5
},
"mem_storage": {
"description": "Force the consumer state to be kept in memory rather than inherit the setting from the stream",
"type": "boolean",
"default": false
},
"metadata": {
"description": "Additional metadata for the Consumer",
"type": "object",
"additionalProperties": { "type": "string" }
},
"pause_until": {
"description": "When creating a consumer supplying a time in the future will act as a deadline for when the consumer will be paused till",
"$ref": "#/definitions/golang_time"
},
"priority_groups": {
"description": "List of priority groups this consumer supports",
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"priority_policy": {
"description": "The priority policy the consumer is set to",
"$ref": "#/definitions/priority_policy"
},
"priority_timeout": {
"description": "For pinned_client priority policy how long before the client times out"
},
"opt_start_seq": {
"description": "Start sequence used with the DeliverByStartSequence deliver policy.",
"$ref": "#/definitions/golang_uint64",
"minimum": 0
},
"opt_start_time": {
"description": "Start time used with the DeliverByStartSequence deliver policy",
"$ref": "#/definitions/golang_time"
}
}
},
"stream_info": {
"type": "object",
"required": ["config", "state", "created"],
"properties": {
"config": {
"type": "object",
"description": "The active configuration for the Stream",
"allOf": [
{"$ref": "#/definitions/stream_configuration"}
]
},
"state": {
"type": "object",
"description": "Detail about the current State of the Stream",
"allOf": [
{"$ref": "#/definitions/stream_state"}
]
},
"created": {
"description": "Timestamp when the stream was created",
"$ref": "#/definitions/golang_time"
},
"ts": {
"description": "The server time the stream info was created",
"$ref": "#/definitions/golang_time"
},
"cluster": {
"$ref": "#/definitions/cluster_info"
},
"mirror": {
"$ref": "#/definitions/stream_source_info"
},
"sources": {
"type": "array",
"description": "Streams being sourced into this Stream",
"items": {
"$ref": "#/definitions/stream_source_info"
}
},
"alternates": {
"type": "array",
"description": "List of mirrors sorted by priority",
"items": {
"$ref": "#/definitions/stream_alternate"
}
}
}
},
"stream_alternate": {
"type": "object",
"description": "An alternate location to read mirrored data",
"required": ["name", "cluster"],
"properties": {
"name": {
"type": "string",
"description": "The mirror stream name"
},
"cluster": {
"type": "string",
"description": "The name of the cluster holding the stream"
},
"domain": {
"type": "string",
"description": "The domain holding the string"
}
}
},
"stream_state": {
"type": "object",
"additionalProperties": false,
"required": ["messages", "bytes", "first_seq", "last_seq", "consumer_count"],
"properties": {
"messages": {
"$ref": "#/definitions/golang_uint64",
"description": "Number of messages stored in the Stream",
"minimum": 0
},
"bytes": {
"$ref": "#/definitions/golang_uint64",
"description": "Combined size of all messages in the Stream",
"minimum": 0
},
"first_seq": {
"$ref": "#/definitions/golang_uint64",
"description": "Sequence number of the first message in the Stream",
"minimum": 0
},
"first_ts": {
"type": "string",
"description": "The timestamp of the first message in the Stream"
},
"last_seq": {
"$ref": "#/definitions/golang_uint64",
"description": "Sequence number of the last message in the Stream",
"minimum": 0
},
"last_ts": {
"type": "string",
"description": "The timestamp of the last message in the Stream"
},
"deleted": {
"description": "IDs of messages that were deleted using the Message Delete API or Interest based streams removing messages out of order",
"type": "array",
"minLength": 0,
"items": {
"$ref": "#/definitions/golang_uint64",
"minimum": 0
}
},
"subjects": {
"description": "Subjects and their message counts when a subjects_filter was set",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/golang_uint64"
}
},
"num_subjects": {
"description": "The number of unique subjects held in the stream",
"$ref": "#/definitions/golang_int",
"minimum": 0
},
"num_deleted": {
"description": "The number of deleted messages",
"$ref": "#/definitions/golang_int",
"minimum": 0
},
"lost": {
"$ref": "#/definitions/lost_stream_data"
},