-
Notifications
You must be signed in to change notification settings - Fork 123
/
bmqp_ctrlmsg.xsd
1755 lines (1600 loc) · 68.5 KB
/
bmqp_ctrlmsg.xsd
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
<?xml version='1.0' encoding='UTF-8'?>
<schema xmlns = 'http://www.w3.org/2001/XMLSchema'
xmlns:bdem = 'http://bloomberg.com/schemas/bdem'
xmlns:tns = 'http://bloomberg.com/schemas/bmqp'
targetNamespace = 'http://bloomberg.com/schemas/bmqp'
bdem:package = 'bmqp_ctrlmsg'
elementFormDefault = 'qualified'>
<!-- ========================================================================
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: BMQP_CTRLMSG :
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
This 'bmqp_ctrlmsg' schema defines all the types of messages used for:
o client <-> broker communication
o broker <-> broker communication
Any message sent is of either one of those top level types:
o ControlMessage
o NegotiationMessage
The following convention is used for controlMessage:
Each request is just the name of the request ('openQueue',
'closeQueue', ...). The response to those requests is either the
request name with 'Response' appended ('openQueueResponse',
'closeQueueResponse', ...) in case of success; of the 'failure' type
in case of error.
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
==================================================================== -->
<!-- ========================================================================
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: GENERIC TYPES :
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
==================================================================== -->
<simpleType name='StatusCategory'>
<annotation>
<documentation>
Enumeration of the various status categories.
Some categories (TIMEOUT, CANCELED) should not be sent by the broker,
but adding them in that enum will make it possible from the SDK (which
could fire those errors in response of a request) to simulate such
response from the broker and hence allow to use a single code path for
the response handling.
## This enum must remain in sync with 'bmqt_resultcode::GenericResult'
</documentation>
</annotation>
<restriction base='string' bdem:preserveEnumOrder='1'>
<enumeration value='E_SUCCESS' bdem:id='0'/>
<enumeration value='E_UNKNOWN' bdem:id='-1'/>
<enumeration value='E_TIMEOUT' bdem:id='-2'/>
<enumeration value='E_NOT_CONNECTED' bdem:id='-3'/>
<enumeration value='E_CANCELED' bdem:id='-4'/>
<enumeration value='E_NOT_SUPPORTED' bdem:id='-5'/>
<enumeration value='E_REFUSED' bdem:id='-6'/>
<enumeration value='E_INVALID_ARGUMENT' bdem:id='-7'/>
<enumeration value='E_NOT_READY' bdem:id='-8'/>
</restriction>
</simpleType>
<complexType name='Status'>
<annotation>
<documentation>
Generic type to represent a status.
category.: the category of the status
code.....: an integer value representing the error
message..: an optional string describing the error
</documentation>
</annotation>
<sequence>
<element name='category' type='tns:StatusCategory'/>
<element name='code' type='int'/>
<element name='message' type='string' default=''/>
</sequence>
</complexType>
<!-- ========================================================================
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: CONTROL MESSAGE :
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
==================================================================== -->
<complexType name='ControlMessage'>
<annotation>
<documentation>
This type is the top level type for any message being sent by a client
to the broker or a broker to another broker. Each message can be
associated with an optional 'rId' (requestId) that, if specified, will
be set to the same value as part of the response to correlate the
request and the response together.
rId....: optional id of this specific request
choice.: enumerates all the different types of control messages
</documentation>
</annotation>
<sequence>
<element name='rId' type='int' minOccurs='0'/>
<choice>
<element bdem:id='0' name='status' type='tns:Status'/>
<element bdem:id='1' name='disconnect' type='tns:Disconnect'/>
<element bdem:id='2' name='disconnectResponse' type='tns:DisconnectResponse'/>
<!-- No longer used types:
3: openQueueOld
4: openQueueResponseOld
5: closeQueueOld
6: closeQueueResponseOld
-->
<element bdem:id='7' name='adminCommand' type='tns:AdminCommand'/>
<element bdem:id='8' name='adminCommandResponse' type='tns:AdminCommandResponse'/>
<element bdem:id='9' name='clusterMessage' type='tns:ClusterMessage'/>
<element bdem:id='10' name='openQueue' type='tns:OpenQueue'/>
<element bdem:id='11' name='openQueueResponse' type='tns:OpenQueueResponse'/>
<element bdem:id='12' name='closeQueue' type='tns:CloseQueue'/>
<element bdem:id='13' name='closeQueueResponse' type='tns:CloseQueueResponse'/>
<element bdem:id='14' name='configureQueueStream' type='tns:ConfigureQueueStream'/>
<element bdem:id='15' name='configureQueueStreamResponse' type='tns:ConfigureQueueStreamResponse'/>
<element bdem:id='16' name='configureStream' type='tns:ConfigureStream'/>
<element bdem:id='17' name='configureStreamResponse' type='tns:ConfigureStreamResponse'/>
</choice>
</sequence>
</complexType>
<complexType name='Disconnect'>
<annotation>
<documentation>
This request is sent by the SDK to the broker to perform a gracefull
clean shutdown.
</documentation>
</annotation>
<sequence>
<!-- Reserved for future use -->
</sequence>
</complexType>
<complexType name='DisconnectResponse'>
<annotation>
<documentation>
This response is sent by the broker to the SDK in response to a
'Disconnect' request, to acknowledge reception of the request and
indicate to the client it's good to close the channel.
</documentation>
</annotation>
<sequence>
<!-- Reserved for future use -->
</sequence>
</complexType>
<complexType name='AdminCommand'>
<annotation>
<documentation>
This request is sent by the admin client to execute the specified
command on the broker. Command is expected in a human-friendly text
format, to get a list of available commands 'help' command can be sent.
</documentation>
</annotation>
<sequence>
<element name='command' type='string'/>
</sequence>
</complexType>
<complexType name='AdminCommandResponse'>
<annotation>
<documentation>
This response is sent by the broker to the admin client in response to
an 'AdminCommand' request with the command execution results. The
resulting text can be both non-structured text or represent a valid
json, depending on specific command. Also it can contain error message
if some problem occured.
</documentation>
</annotation>
<sequence>
<element name='text' type='string'/>
</sequence>
</complexType>
<complexType name='OpenQueue'>
<annotation>
<documentation>
This request is an indication that the client wants to open a queue,
and the upstream node should create a queue handle for the requester.
handleParameters.: Parameters for the queue handle to be created
</documentation>
</annotation>
<sequence>
<element name='handleParameters' type='tns:QueueHandleParameters'/>
</sequence>
</complexType>
<complexType name='OpenQueueResponse'>
<annotation>
<documentation>
Response of an 'OpenQueue' request indicating success of the operation.
originalRequest......: original request this 'OpenQueueResponse' is the
response of
routingConfiguration.: routing info to be used by the downstream
node to distribute messages to consumers
attached to it
deduplicationTimeMs........:
timeout, in milliseconds, to keep GUID of PUT message for the
purpose of detecting duplicate PUTs.
</documentation>
</annotation>
<sequence>
<element name='originalRequest' type='tns:OpenQueue'/>
<element name='routingConfiguration' type='tns:RoutingConfiguration'/>
<element name='deduplicationTimeMs' type='int' default='300000'/> <!-- 5 minutes -->
</sequence>
</complexType>
<complexType name='ConfigureQueueStream'>
<annotation>
<documentation>
This request contains parameters advertised by the downstream node so
that upstream node can configure the stream associated with the
downstream node.
qId..............: Id identifying the queue
streamParameters.: Parameters for configuring the stream
</documentation>
</annotation>
<sequence>
<element name='qId' type='unsignedInt'/>
<element name='streamParameters' type='tns:QueueStreamParameters'/>
</sequence>
</complexType>
<complexType name='ConfigureQueueStreamResponse'>
<annotation>
<documentation>
Response of a 'ConfigureQueueStream' request, indicating success of the
operation.
</documentation>
</annotation>
<sequence>
<element name='request' type='tns:ConfigureQueueStream'/>
</sequence>
</complexType>
<complexType name='CloseQueue'>
<annotation>
<documentation>
This request contains parameters advertised by the downstream node
when it wants to close a queue on an upstream node.
handleParameters.: Queue handle parameters as advertised by the
downstream node
isFinal..........: Flag advertising if downstream node has no more
clients for this queue, and upstream node is free to
delete the queue handle representing the downstream
node
</documentation>
</annotation>
<sequence>
<element name='handleParameters' type='tns:QueueHandleParameters'/>
<element name='isFinal' type='boolean' default='false'/>
</sequence>
</complexType>
<complexType name='CloseQueueResponse'>
<annotation>
<documentation>
Response of a 'CloseQueue' request, indicating success of the
operation.
</documentation>
</annotation>
<sequence>
<!-- Reserved for future use; indicates a success to configure queue stream -->
</sequence>
</complexType>
<complexType name='ConfigureStream'>
<annotation>
<documentation>
This request contains parameters advertised by the downstream node so
that upstream node can configure subscriptions associated with the
given queue on the downstream node.
qId....................: Id identifying the queue
subscriptionParameters.: Parameters for configuring subscriptions
</documentation>
</annotation>
<sequence>
<element name='qId' type='unsignedInt'/>
<element name='streamParameters' type='tns:StreamParameters'/>
</sequence>
</complexType>
<complexType name='ConfigureStreamResponse'>
<annotation>
<documentation>
Response of a 'ConfigureStream' request, indicating success of
the operation.
</documentation>
</annotation>
<sequence>
<element name='request' type='tns:ConfigureStream'/>
</sequence>
</complexType>
<complexType name='QueueHandleParameters'>
<annotation>
<documentation>
This complex type contains various parameters required by an upstream
node to create a queue handle for the requester.
uri........: URI of the queue to open
qId........: id that will be used to reference this queue
subIdInfo..: Optional SubQueueId info, applicable if requester is a
fanout consumer
flags......: flags to use when opening the queue
readCount..: the number of 'downstream' reader clients aggregated in
this open queue request
writeCount.: the number of 'downstream' writer clients aggregated in
this open queue request
adminCount.: the number of 'downstream' admin clients aggregated in
this open queue request
</documentation>
</annotation>
<sequence>
<element name='uri' type='string'/>
<element name='qId' type='unsignedInt'/>
<element name='subIdInfo' type='tns:SubQueueIdInfo' minOccurs='0'/>
<element name='flags' type='unsignedLong'/>
<element name='readCount' type='int' default='0'/>
<element name='writeCount' type='int' default='0'/>
<element name='adminCount' type='int' default='0'/>
</sequence>
</complexType>
<complexType name='QueueStreamParameters'>
<annotation>
<documentation>
This complex type contains various parameters required by an upstream
node to configure a queue handle (i.e., a "stream") that has already
been created.
subIdInfo..............: Optional subQueueId identifying the stream in
case downstream node represents a fanout
consumer
maxUnconfirmedMessages.: maximum number of outstanding delivered but
pending confirmation from the client
maxUnconfirmedBytes....: maximum cumulated bytes of all outstanding
delivered but pending confirmation messages
from the client
consumerPriority.......: priority as advertised by the downstream node
for this stream
consumerPriorityCount..: weight of the stream as advertised by the
downstream node, having above-mentioned
consumer priority
</documentation>
</annotation>
<sequence>
<element name='subIdInfo' type='tns:SubQueueIdInfo' minOccurs='0'/>
<element name='maxUnconfirmedMessages' type='long' default='0'/>
<element name='maxUnconfirmedBytes' type='long' default='0'/>
<element name='consumerPriority' type='int' default='-2147483648'/>
<element name='consumerPriorityCount' type='int' default='0'/>
</sequence>
</complexType>
<complexType name='SubQueueIdInfo'>
<annotation>
<documentation>
This complex type contains various attributes which uniquely
identify a subQueueId (which typically would represent a fanout
consumer).
subId.: Id of the subQueue
appId.: Application-provided unique string identifier for a given
fanout consumer
</documentation>
</annotation>
<sequence>
<element name='subId' type='unsignedInt' default='0'/>
<element name='appId' type='string' default='__default'/>
</sequence>
</complexType>
<complexType name='StreamParameters'>
<annotation>
<documentation>
This request contains parameters advertised by the downstream node so
that upstream node can configure subscriptions associated with the
given queue on the downstream node.
appId..................: Application-provided unique string identifier
for a given fanout consumer
subscriptions..........: Parameters for configuring subscriptions
</documentation>
</annotation>
<sequence>
<element name='appId' type='string' default='__default'/>
<element name='subscriptions' type='tns:Subscription' maxOccurs='unbounded'/>
</sequence>
</complexType>
<simpleType name='ExpressionVersion'>
<annotation>
<documentation>
Enumeration of the various expression versions.
</documentation>
</annotation>
<restriction base='string' bdem:preserveEnumOrder='1'>
<enumeration value='E_UNDEFINED' bdem:id='0'/>
<enumeration value='E_VERSION_1' bdem:id='1'/>
</restriction>
</simpleType>
<complexType name='Expression'>
<annotation>
<documentation>
This complex type contains expression to evaluate when selecting
Subscription for delivery.
version................: expression version (default is HSL)
text...................: textual representation of the expression
</documentation>
</annotation>
<sequence>
<element name='version' type='tns:ExpressionVersion' default='E_UNDEFINED'/>
<element name='text' type='string'/>
</sequence>
</complexType>
<complexType name='ConsumerInfo'>
<annotation>
<documentation>
This complex type contains various parameters required by an upstream
node to configure subscription for a queue handle that has already been
created.
maxUnconfirmedMessages.: maximum number of outstanding delivered but
pending confirmation from the client
maxUnconfirmedBytes....: maximum cumulated bytes of all outstanding
delivered but pending confirmation messages
from the client
consumerPriority.......: priority as advertised by the downstream node
for this subscription
consumerPriorityCount..: weight of the subscription as advertised by
the downstream node, having above-mentioned
consumer priority
</documentation>
</annotation>
<sequence>
<element name='maxUnconfirmedMessages' type='long' default='0'/>
<element name='maxUnconfirmedBytes' type='long' default='0'/>
<element name='consumerPriority' type='int' default='-2147483648'/>
<element name='consumerPriorityCount' type='int' default='0'/>
</sequence>
</complexType>
<complexType name='Subscription'>
<annotation>
<documentation>
This complex type contains various parameters required by an upstream
node to configure subscription for a queue handle that has already been
created.
sId....................: subscription identifier
consumers..............: consumer parameters
</documentation>
</annotation>
<sequence>
<element name='sId' type='unsignedInt' />
<element name='expression' type='tns:Expression' />
<element name='consumers' type='tns:ConsumerInfo' maxOccurs='unbounded'/>
</sequence>
</complexType>
<complexType name='RoutingConfiguration'>
<annotation>
<documentation>
This complex type contains various attributes required by the
downstream node to route messages to the consumers attached to it.
flags.: Flags representing the routing configuration
</documentation>
</annotation>
<sequence>
<element name='flags' type='unsignedLong'>
<annotation>
<documentation>
This is an unsigned representation with flag bits specified on
the 'RoutingConfigurationFlags' type.
</documentation>
</annotation>
</element>
</sequence>
</complexType>
<simpleType name='RoutingConfigurationFlags'>
<annotation>
<documentation>
This flag encodes configuration on how messages should be routed
to downstream consumers.
E_AT_MOST_ONCE..............: This indicates that this domain is
configured with at-most-once semantics.
This in turn means that confirms are
optional and acknowledgments (if
required) will always be send, even if
there's message loss.
E_DELIVER_CONSUMER_PRIORITY.: This flag indicates that only downstream
consumers having the highest consumer
should be considered as available
destination for a message.
E_DELIVER_ALL...............: This flag indicates that messages should
be delivered to all available downstream
consumers (after some added filtering
based on other flags, such as
'E_DELIVER_CONSUMER_PRIORITY').
E_HAS_MULTIPLE_SUB_STREAMS..: This flag indicates that multiple
downstream consumers should be considered
as available destination for a message.
</documentation>
</annotation>
<restriction base='string' bdem:preserveEnumOrder='1'>
<enumeration value='E_AT_MOST_ONCE' bdem:id='0'/>
<enumeration value='E_DELIVER_CONSUMER_PRIORITY' bdem:id='1'/>
<enumeration value='E_DELIVER_ALL' bdem:id='2'/>
<enumeration value='E_HAS_MULTIPLE_SUB_STREAMS' bdem:id='3'/>
</restriction>
</simpleType>
<!-- ========================================================================
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: CLUSTER MESSAGE :
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::#
==================================================================== -->
<complexType name='ClusterMessage'>
<annotation>
<documentation>
This type is the top level type for any message being sent by a node
inside the cluster to one or more peer nodes. Note that this type of
message is not sent outside the cluster.
choice.: enumerates all the different types of cluster messages
</documentation>
</annotation>
<sequence>
<choice>
<element name='partitionPrimaryAdvisory' type='tns:PartitionPrimaryAdvisory'/>
<element name='leaderAdvisory' type='tns:LeaderAdvisory'/>
<element name='queueAssignmentAdvisory' type='tns:QueueAssignmentAdvisory'/>
<element name='nodeStatusAdvisory' type='tns:NodeStatusAdvisory'/>
<element name='leaderSyncStateQuery' type='tns:LeaderSyncStateQuery'/>
<element name='leaderSyncStateQueryResponse' type='tns:LeaderSyncStateQueryResponse'/>
<element name='leaderSyncDataQuery' type='tns:LeaderSyncDataQuery'/>
<element name='leaderSyncDataQueryResponse' type='tns:LeaderSyncDataQueryResponse'/>
<element name='queueAssignmentRequest' type='tns:QueueAssignmentRequest'/>
<element name='storageSyncRequest' type='tns:StorageSyncRequest'/>
<element name='storageSyncResponse' type='tns:StorageSyncResponse'/>
<element name='partitionSyncStateQuery' type='tns:PartitionSyncStateQuery'/>
<element name='partitionSyncStateQueryResponse' type='tns:PartitionSyncStateQueryResponse'/>
<element name='partitionSyncDataQuery' type='tns:PartitionSyncDataQuery'/>
<element name='partitionSyncDataQueryResponse' type='tns:PartitionSyncDataQueryResponse'/>
<element name='partitionSyncDataQueryStatus' type='tns:PartitionSyncDataQueryStatus'/>
<element name='primaryStatusAdvisory' type='tns:PrimaryStatusAdvisory'/>
<element name='clusterSyncRequest' type='tns:ClusterSyncRequest'/>
<element name='clusterSyncResponse' type='tns:ClusterSyncResponse'/>
<element name='queueUnAssignmentAdvisory' type='tns:QueueUnAssignmentAdvisory'/>
<element name='queueUnassignedAdvisory' type='tns:QueueUnassignedAdvisory'/>
<element name='leaderAdvisoryAck' type='tns:LeaderAdvisoryAck'/>
<element name='leaderAdvisoryCommit' type='tns:LeaderAdvisoryCommit'/>
<element name='stateNotification' type='tns:StateNotification'/>
<element name='stopRequest' type='tns:StopRequest'/>
<element name='stopResponse' type='tns:StopResponse'/>
<element name='queueUnassignmentRequest' type='tns:QueueUnassignmentRequest'/>
<element name='queueUpdateAdvisory' type='tns:QueueUpdateAdvisory'/>
<element name='clusterStateFSMMessage' type='tns:ClusterStateFSMMessage'/>
<element name='partitionMessage' type='tns:PartitionMessage'/>
</choice>
</sequence>
</complexType>
<complexType name='ClusterStateFSMMessage'>
<annotation>
<documentation>
This type is the top level type for any message being sent by a node
inside the cluster to one or more peer nodes that triggers an event in
the Cluster State FSM.
Note that this type of message is not sent outside the cluster.
choice.: enumerates all the different types of cluster state messages
</documentation>
</annotation>
<sequence>
<choice>
<element name='followerLSNRequest' type='tns:FollowerLSNRequest'/>
<element name='followerLSNResponse' type='tns:FollowerLSNResponse'/>
<element name='registrationRequest' type='tns:RegistrationRequest'/>
<element name='registrationResponse' type='tns:RegistrationResponse'/>
<element name='followerClusterStateRequest' type='tns:FollowerClusterStateRequest'/>
<element name='followerClusterStateResponse' type='tns:FollowerClusterStateResponse'/>
</choice>
</sequence>
</complexType>
<complexType name='FollowerLSNRequest'>
<annotation>
<documentation>
This type represents a request sent by the leader to a follower to
query its leader-sequence number.
</documentation>
</annotation>
</complexType>
<complexType name='FollowerLSNResponse'>
<annotation>
<documentation>
This type represents a response to the 'FollowerLSNRequest' sent by
a follower to the leader.
sequenceNumber..: Follower's leader-sequence number
</documentation>
</annotation>
<sequence>
<element name='sequenceNumber' type='tns:LeaderMessageSequence'/>
</sequence>
</complexType>
<complexType name='RegistrationRequest'>
<annotation>
<documentation>
This type represents a request sent by a follower to the leader to
register its leader-sequence number.
sequenceNumber..: Follower's leader-sequence number
</documentation>
</annotation>
<sequence>
<element name='sequenceNumber' type='tns:LeaderMessageSequence'/>
</sequence>
</complexType>
<complexType name='RegistrationResponse'>
<annotation>
<documentation>
This type represents a response to the 'RegistrationRequest' sent by
the leader to a follower.
</documentation>
</annotation>
</complexType>
<complexType name='FollowerClusterStateRequest'>
<annotation>
<documentation>
This type represents a request sent by the leader to the highest LSN
follower to obtain its cluster state snapshot.
</documentation>
</annotation>
</complexType>
<complexType name='FollowerClusterStateResponse'>
<annotation>
<documentation>
This type represents a response to the 'FollowerClusterStateRequest'
sent by the highest LSN follower to the leader, containing its cluster
state snapshot.
clusterStateSnapshot..: Encoded cluster state snapshot, in the form of
a leader advisory.
</documentation>
</annotation>
<sequence>
<element name='clusterStateSnapshot' type='tns:LeaderAdvisory'/>
</sequence>
</complexType>
<complexType name='PartitionMessage'>
<annotation>
<documentation>
This type is the top level type for any message being sent by a node
inside the cluster to one or more peer nodes to exchange partition
state. Note that this type of message is not sent outside the cluster.
choice.: enumerates all the different types of partition messages
</documentation>
</annotation>
<sequence>
<choice>
<element name='replicaStateRequest' type='tns:ReplicaStateRequest'/>
<element name='replicaStateResponse' type='tns:ReplicaStateResponse'/>
<element name='primaryStateRequest' type='tns:PrimaryStateRequest'/>
<element name='primaryStateResponse' type='tns:PrimaryStateResponse'/>
<element name='replicaDataRequest' type='tns:ReplicaDataRequest'/>
<element name='replicaDataResponse' type='tns:ReplicaDataResponse'/>
</choice>
</sequence>
</complexType>
<complexType name='ReplicaStateRequest'>
<annotation>
<documentation>
This type represents a request sent to the replica by the primary to
ask for replica's sequence number. The primary also sends its own
sequence number as part of this request.
partitionId: partition id for corresponding partition.
sequenceNumber: Primary's sequence number for corresponding partition.
</documentation>
</annotation>
<sequence>
<element name='partitionId' type='int'/>
<element name='sequenceNumber' type='tns:PartitionSequenceNumber'/>
</sequence>
</complexType>
<complexType name='ReplicaStateResponse'>
<annotation>
<documentation>
This type represents a response sent by a replica to the primary along
with its sequence number.
partitionId: partition id for corresponding partition.
sequenceNumber: Replica's sequence number for corresponding partition.
</documentation>
</annotation>
<sequence>
<element name='partitionId' type='int'/>
<element name='sequenceNumber' type='tns:PartitionSequenceNumber'/>
</sequence>
</complexType>
<complexType name='PrimaryStateRequest'>
<annotation>
<documentation>
This type represents a request sent to the primary by a replica to
ask for primary's sequence number. The replica also sends it own
sequence number as part of this request.
partitionId: partition id for corresponding partition.
sequenceNumber: Replica's sequence number for corresponding partition.
</documentation>
</annotation>
<sequence>
<element name='partitionId' type='int'/>
<element name='sequenceNumber' type='tns:PartitionSequenceNumber'/>
</sequence>
</complexType>
<complexType name='PrimaryStateResponse'>
<annotation>
<documentation>
This type represents a response sent by a primary to the replica along
with its sequence number.
partitionId: partition id for corresponding partition.
sequenceNumber: Primary's sequence number for corresponding partition.
</documentation>
</annotation>
<sequence>
<element name='partitionId' type='int'/>
<element name='sequenceNumber' type='tns:PartitionSequenceNumber'/>
</sequence>
</complexType>
<complexType name='ReplicaDataRequest'>
<annotation>
<documentation>
This type represents a request sent to the replica by the primary to
start the synchronization of data.
replicaDataType: type of request i.e. PULL, PUSH or DROP for
corresponding partition.
partitionId: partition id for corresponding partition.
beginSequenceNumber: Primary's begin sequence number for corresponding
partition for corresponding data chunks.
endSequenceNumber: Primary's end sequence number for corresponding
partition for corresponding data chunks.
</documentation>
</annotation>
<sequence>
<element name='replicaDataType' type='tns:ReplicaDataType'/>
<element name='partitionId' type='int'/>
<element name='beginSequenceNumber' type='tns:PartitionSequenceNumber'/>
<element name='endSequenceNumber' type='tns:PartitionSequenceNumber'/>
</sequence>
</complexType>
<complexType name='ReplicaDataResponse'>
<annotation>
<documentation>
This type represents a response sent by a replica to the primary for
the data synchronization request received by it.
replicaDataType: type of request received i.e. PULL, PUSH or DROP
for corresponding partition. Note, this field will
be set as per the request received and the primary
purpose of sending this field back in response is
for debugging and sanity checking.
partitionId: partition id for corresponding partition.
beginSequenceNumber: Replica's begin sequence number for corresponding
partition for corresponding data chunks.
endSequenceNumber: Replica's end sequence number for corresponding
partition for corresponding data chunks.
</documentation>
</annotation>
<sequence>
<element name='replicaDataType' type='tns:ReplicaDataType'/>
<element name='partitionId' type='int'/>
<element name='beginSequenceNumber' type='tns:PartitionSequenceNumber'/>
<element name='endSequenceNumber' type='tns:PartitionSequenceNumber'/>
</sequence>
</complexType>
<simpleType name='ReplicaDataType'>
<annotation>
<documentation>
Enumeration of the various replica data request/response types.
</documentation>
</annotation>
<restriction base='string' bdem:preserveEnumOrder='1'>
<enumeration value='E_UNKNOWN' bdem:id='0'/>
<enumeration value='E_PULL' bdem:id='10'/>
<enumeration value='E_PUSH' bdem:id='20'/>
<enumeration value='E_DROP' bdem:id='30'/>
</restriction>
</simpleType>
<complexType name='PartitionPrimaryAdvisory'>
<annotation>
<documentation>
This type represents a one way message sent by the leader to all
followers with a mapping of partition -> primary node, and other
relevant infomration.
</documentation>
</annotation>
<sequence>
<element name='sequenceNumber' type='tns:LeaderMessageSequence'/>
<element name='partitions' type='tns:PartitionPrimaryInfo' maxOccurs='unbounded'/>
</sequence>
</complexType>
<complexType name='LeaderMessageSequence'>
<annotation>
<documentation>
This type represents the sequence number of a message/advisory/response
sent by the leader.
</documentation>
</annotation>
<sequence>
<element name='electorTerm' type='unsignedLong'/>
<element name='sequenceNumber' type='unsignedLong'/>
</sequence>
</complexType>
<complexType name='PartitionSequenceNumber'>
<annotation>
<documentation>
This type represents the logical sequence number in a partition.
</documentation>
</annotation>
<sequence>
<element name='primaryLeaseId' type='unsignedInt'/>
<element name='sequenceNumber' type='unsignedLong'/>
</sequence>
</complexType>
<complexType name='PartitionPrimaryInfo'>
<annotation>
<documentation>
This type represents the details of parition->primary node mapping.
</documentation>
</annotation>
<sequence>
<element name='partitionId' type='int'/>
<element name='primaryNodeId' type='int'/>
<element name='primaryLeaseId' type='unsignedInt'/>
</sequence>
</complexType>
<complexType name='AppIdInfo'>
<annotation>
<documentation>
This type represents the details of an application id, that is the app
id string and app key bytes for a queue.
</documentation>
</annotation>
<sequence>
<element name='appId' type='string'/>
<element name='appKey' type='hexBinary'/>
</sequence>
</complexType>
<complexType name='QueueInfo'>
<annotation>
<documentation>
This type represents a queue assignment, that is the key and
partitionId assigned to a given URI.
</documentation>
</annotation>
<sequence>
<element name='uri' type='string'/>
<element name='key' type='hexBinary'/>
<element name='partitionId' type='int'/>
<element name='appIds' type='tns:AppIdInfo' maxOccurs='unbounded'/>
</sequence>
</complexType>
<complexType name='QueueInfoUpdate'>
<annotation>
<documentation>
This type represents a queue update, that is the added or removed
appIds for a given URI. In the case of (un)registering appIds for a
domain without any queues present, the 'domain' field will be populated
whereas the 'uri', 'key' and 'partitionId' will all be set to
null/invalid.
</documentation>
</annotation>
<sequence>
<element name='uri' type='string'/>
<element name='key' type='hexBinary'/>
<element name='partitionId' type='int'/>
<element name='addedAppIds' type='tns:AppIdInfo' maxOccurs='unbounded'/>
<element name='removedAppIds' type='tns:AppIdInfo' maxOccurs='unbounded'/>
<element name='domain' type='string'/>
</sequence>
</complexType>
<complexType name='QueueAssignmentAdvisory'>
<annotation>
<documentation>
This type represents a one way message sent by the leader to all
followers when a queue is assigned a partition.
</documentation>
</annotation>
<sequence>
<element name='sequenceNumber' type='tns:LeaderMessageSequence'/>
<element name='queues' type='tns:QueueInfo' maxOccurs='unbounded'/>
</sequence>
</complexType>
<complexType name='QueueUpdateAdvisory'>
<annotation>
<documentation>
This type represents a one way message sent by the leader to all
followers when appIds are added to, or removed from, a queue.
</documentation>
</annotation>
<sequence>
<element name='sequenceNumber' type='tns:LeaderMessageSequence'/>
<element name='queueUpdates' type='tns:QueueInfoUpdate' maxOccurs='unbounded'/>
</sequence>
</complexType>
<complexType name='QueueUnAssignmentAdvisory'>
<annotation>
<documentation>
This type represents a one way message sent by the primary of a
partition to all peers when queues are unmapped from that partition.
NOTE: The 'partitionId' member of 'QueueInfo' is unused (superseeded by
the 'partitionId' at this level of the data structure).
</documentation>
</annotation>
<sequence>
<element name='primaryNodeId' type='int'/>
<element name='primaryLeaseId' type='unsignedInt'/>
<element name='partitionId' type='int'/>
<element name='queues' type='tns:QueueInfo' maxOccurs='unbounded'/>
</sequence>
</complexType>
<complexType name='QueueUnassignedAdvisory'>
<annotation>
<documentation>
This type represents a one way message sent by the leader to all peers
when queues are unmapped from that partition. Once the logic is updated
such that leader broadcasts queue unassigned advisories, primary node
will no longer broadcastthem, and the other similar type
'QueueUnAssignmentAdvisory' will be removed.
</documentation>
</annotation>
<sequence>
<element name='sequenceNumber' type='tns:LeaderMessageSequence'/>
<element name='partitionId' type='int'/>
<element name='primaryLeaseId' type='unsignedInt'/>
<element name='primaryNodeId' type='int'/>
<element name='queues' type='tns:QueueInfo' maxOccurs='unbounded'/>
</sequence>
</complexType>
<complexType name='LeaderAdvisory'>
<annotation>
<documentation>
This type represents a one way message sent by the leader to all
followers about partition/primary and queue info mappings.
</documentation>
</annotation>
<sequence>
<element name='sequenceNumber' type='tns:LeaderMessageSequence'/>
<element name='partitions' type='tns:PartitionPrimaryInfo' maxOccurs='unbounded'/>
<element name='queues' type='tns:QueueInfo' maxOccurs='unbounded'/>
</sequence>
</complexType>