-
Notifications
You must be signed in to change notification settings - Fork 0
/
rdkafka.pas
5662 lines (5307 loc) · 237 KB
/
rdkafka.pas
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
unit rdkafka;
{ This unit is automatically generated by Chet:
https://github.com/neslib/Chet }
{$MINENUMSIZE 4}
interface
uses
Winapi.Windows,
Winapi.WinSock2;
const
{$IF Defined(WIN32)}
LIBRDKAFKA_DLL = 'librdkafka.dll';
_PU = '';
{$ELSEIF Defined(WIN64)}
LIBRDKAFKA_DLL = 'librdkafka.dll';
_PU = '';
{$ELSE}
{$MESSAGE Error 'Unsupported platform'}
{$ENDIF}
const
{ TODO : Macro refers to system symbol "__inline": }
(* RD_INLINE __inline *)
{ TODO : Macro refers to system symbol "__declspec": }
(* RD_DEPRECATED __declspec ( deprecated ) *)
{ TODO : Macro refers to system symbol "__declspec": }
(* RD_EXPORT __declspec ( dllimport ) *)
LIBRDKAFKA_TYPECHECKS = 0;
{ TODO : Unable to convert function-like macro: }
(* _LRK_TYPECHECK ( RET , TYPE , ARG ) ( RET ) *)
{ TODO : Unable to convert function-like macro: }
(* _LRK_TYPECHECK2 ( RET , TYPE , ARG , TYPE2 , ARG2 ) ( RET ) *)
{ TODO : Unable to convert function-like macro: }
(* _LRK_TYPECHECK3 ( RET , TYPE , ARG , TYPE2 , ARG2 , TYPE3 , ARG3 ) ( RET ) *)
RD_KAFKA_VERSION_ = $010500ff;
RD_KAFKA_DEBUG_CONTEXTS = 'all,generic,broker,topic,metadata,feature,queue,msg,protocol,cgrp,security,fetch,interceptor,plugin,consumer,admin,eos,mock';
{ TODO : Unable to convert function-like macro: }
(* RD_KAFKA_V_TOPIC ( topic ) _LRK_TYPECHECK ( RD_KAFKA_VTYPE_TOPIC , const char * , topic ) , ( const char * ) topic *)
{ TODO : Unable to convert function-like macro: }
(* RD_KAFKA_V_RKT ( rkt ) _LRK_TYPECHECK ( RD_KAFKA_VTYPE_RKT , rd_kafka_topic_t * , rkt ) , ( rd_kafka_topic_t * ) rkt *)
{ TODO : Unable to convert function-like macro: }
(* RD_KAFKA_V_PARTITION ( partition ) _LRK_TYPECHECK ( RD_KAFKA_VTYPE_PARTITION , int32_t , partition ) , ( int32_t ) partition *)
{ TODO : Unable to convert function-like macro: }
(* RD_KAFKA_V_VALUE ( VALUE , LEN ) _LRK_TYPECHECK2 ( RD_KAFKA_VTYPE_VALUE , void * , VALUE , size_t , LEN ) , ( void * ) VALUE , ( size_t ) LEN *)
{ TODO : Unable to convert function-like macro: }
(* RD_KAFKA_V_KEY ( KEY , LEN ) _LRK_TYPECHECK2 ( RD_KAFKA_VTYPE_KEY , const void * , KEY , size_t , LEN ) , ( void * ) KEY , ( size_t ) LEN *)
{ TODO : Unable to convert function-like macro: }
(* RD_KAFKA_V_OPAQUE ( msg_opaque ) _LRK_TYPECHECK ( RD_KAFKA_VTYPE_OPAQUE , void * , msg_opaque ) , ( void * ) msg_opaque *)
{ TODO : Unable to convert function-like macro: }
(* RD_KAFKA_V_MSGFLAGS ( msgflags ) _LRK_TYPECHECK ( RD_KAFKA_VTYPE_MSGFLAGS , int , msgflags ) , ( int ) msgflags *)
{ TODO : Unable to convert function-like macro: }
(* RD_KAFKA_V_TIMESTAMP ( timestamp ) _LRK_TYPECHECK ( RD_KAFKA_VTYPE_TIMESTAMP , int64_t , timestamp ) , ( int64_t ) timestamp *)
{ TODO : Unable to convert function-like macro: }
(* RD_KAFKA_V_HEADER ( NAME , VALUE , LEN ) _LRK_TYPECHECK3 ( RD_KAFKA_VTYPE_HEADER , const char * , NAME , const void * , VALUE , ssize_t , LEN ) , ( const char * ) NAME , ( const void * ) VALUE , ( ssize_t ) LEN *)
{ TODO : Unable to convert function-like macro: }
(* RD_KAFKA_V_HEADERS ( HDRS ) _LRK_TYPECHECK ( RD_KAFKA_VTYPE_HEADERS , rd_kafka_headers_t * , HDRS ) , ( rd_kafka_headers_t * ) HDRS *)
RD_KAFKA_DESTROY_F_NO_CONSUMER_CLOSE = $8;
{ TODO : Macro probably use invalid symbol "int32_t": }
RD_KAFKA_PARTITION_UA = UInt32(-1);
RD_KAFKA_OFFSET_BEGINNING = -2;
RD_KAFKA_OFFSET_END = -1;
RD_KAFKA_OFFSET_STORED = -1000;
RD_KAFKA_OFFSET_INVALID = -1001;
RD_KAFKA_OFFSET_TAIL_BASE = -2000;
{ TODO : Unable to convert function-like macro: }
(* RD_KAFKA_OFFSET_TAIL ( CNT ) ( RD_KAFKA_OFFSET_TAIL_BASE - ( CNT ) ) *)
RD_KAFKA_MSG_F_FREE = $1;
RD_KAFKA_MSG_F_COPY = $2;
RD_KAFKA_MSG_F_BLOCK = $4;
RD_KAFKA_MSG_F_PARTITION = $8;
RD_KAFKA_PURGE_F_QUEUE = $1;
RD_KAFKA_PURGE_F_INFLIGHT = $2;
RD_KAFKA_PURGE_F_NON_BLOCKING = $4;
RD_KAFKA_EVENT_NONE = $0;
RD_KAFKA_EVENT_DR = $1;
RD_KAFKA_EVENT_FETCH = $2;
RD_KAFKA_EVENT_LOG_ = $4;
RD_KAFKA_EVENT_ERROR_ = $8;
RD_KAFKA_EVENT_REBALANCE = $10;
RD_KAFKA_EVENT_OFFSET_COMMIT = $20;
RD_KAFKA_EVENT_STATS_ = $40;
RD_KAFKA_EVENT_CREATETOPICS_RESULT_ = 100;
RD_KAFKA_EVENT_DELETETOPICS_RESULT_ = 101;
RD_KAFKA_EVENT_CREATEPARTITIONS_RESULT_ = 102;
RD_KAFKA_EVENT_ALTERCONFIGS_RESULT_ = 103;
RD_KAFKA_EVENT_DESCRIBECONFIGS_RESULT_ = 104;
RD_KAFKA_EVENT_OAUTHBEARER_TOKEN_REFRESH = $100;
type
// Forward declarations
PPUTF8Char = ^PUTF8Char;
PNativeUInt = ^NativeUInt;
PInt64 = ^Int64;
PPointer = ^Pointer;
PInt32 = ^Int32;
Prd_kafka_s = Pointer;
PPrd_kafka_s = ^Prd_kafka_s;
Prd_kafka_topic_s = Pointer;
PPrd_kafka_topic_s = ^Prd_kafka_topic_s;
Prd_kafka_conf_s = Pointer;
PPrd_kafka_conf_s = ^Prd_kafka_conf_s;
Prd_kafka_topic_conf_s = Pointer;
PPrd_kafka_topic_conf_s = ^Prd_kafka_topic_conf_s;
Prd_kafka_queue_s = Pointer;
PPrd_kafka_queue_s = ^Prd_kafka_queue_s;
Prd_kafka_op_s = Pointer;
PPrd_kafka_op_s = ^Prd_kafka_op_s;
Prd_kafka_topic_result_s = Pointer;
PPrd_kafka_topic_result_s = ^Prd_kafka_topic_result_s;
Prd_kafka_consumer_group_metadata_s = Pointer;
PPrd_kafka_consumer_group_metadata_s = ^Prd_kafka_consumer_group_metadata_s;
Prd_kafka_error_s = Pointer;
PPrd_kafka_error_s = ^Prd_kafka_error_s;
Prd_kafka_headers_s = Pointer;
PPrd_kafka_headers_s = ^Prd_kafka_headers_s;
Prd_kafka_AdminOptions_s = Pointer;
PPrd_kafka_AdminOptions_s = ^Prd_kafka_AdminOptions_s;
Prd_kafka_NewTopic_s = Pointer;
PPrd_kafka_NewTopic_s = ^Prd_kafka_NewTopic_s;
Prd_kafka_DeleteTopic_s = Pointer;
PPrd_kafka_DeleteTopic_s = ^Prd_kafka_DeleteTopic_s;
Prd_kafka_NewPartitions_s = Pointer;
PPrd_kafka_NewPartitions_s = ^Prd_kafka_NewPartitions_s;
Prd_kafka_ConfigEntry_s = Pointer;
PPrd_kafka_ConfigEntry_s = ^Prd_kafka_ConfigEntry_s;
Prd_kafka_ConfigResource_s = Pointer;
PPrd_kafka_ConfigResource_s = ^Prd_kafka_ConfigResource_s;
Prd_kafka_err_desc = ^rd_kafka_err_desc;
PPrd_kafka_err_desc = ^Prd_kafka_err_desc;
Prd_kafka_topic_partition_s = ^rd_kafka_topic_partition_s;
Prd_kafka_topic_partition_list_s = ^rd_kafka_topic_partition_list_s;
Prd_kafka_vu_s = ^rd_kafka_vu_s;
Prd_kafka_message_s = ^rd_kafka_message_s;
Prd_kafka_metadata_broker = ^rd_kafka_metadata_broker;
Prd_kafka_metadata_partition = ^rd_kafka_metadata_partition;
Prd_kafka_metadata_topic = ^rd_kafka_metadata_topic;
Prd_kafka_metadata = ^rd_kafka_metadata_;
PPrd_kafka_metadata = ^Prd_kafka_metadata;
Prd_kafka_group_member_info = ^rd_kafka_group_member_info;
Prd_kafka_group_info = ^rd_kafka_group_info;
Prd_kafka_group_list = ^rd_kafka_group_list;
PPrd_kafka_group_list = ^Prd_kafka_group_list;
(**
* @enum rd_kafka_type_t
*
* @brief rd_kafka_t handle type.
*
* @sa rd_kafka_new()
*)
rd_kafka_type_t = (
(** Producer client *)
RD_KAFKA_PRODUCER = 0,
(** Consumer client *)
RD_KAFKA_CONSUMER = 1);
Prd_kafka_type_t = ^rd_kafka_type_t;
(*!
* Timestamp types
*
* @sa rd_kafka_message_timestamp()
*)
rd_kafka_timestamp_type_t = (
(** Timestamp not available *)
RD_KAFKA_TIMESTAMP_NOT_AVAILABLE = 0,
(** Message creation time *)
RD_KAFKA_TIMESTAMP_CREATE_TIME = 1,
(** Log append time *)
RD_KAFKA_TIMESTAMP_LOG_APPEND_TIME = 2);
Prd_kafka_timestamp_type_t = ^rd_kafka_timestamp_type_t;
Prd_kafka_t = Pointer;
PPrd_kafka_t = ^Prd_kafka_t;
Prd_kafka_topic_t = Pointer;
PPrd_kafka_topic_t = ^Prd_kafka_topic_t;
Prd_kafka_conf_t = Pointer;
PPrd_kafka_conf_t = ^Prd_kafka_conf_t;
Prd_kafka_topic_conf_t = Pointer;
PPrd_kafka_topic_conf_t = ^Prd_kafka_topic_conf_t;
Prd_kafka_queue_t = Pointer;
PPrd_kafka_queue_t = ^Prd_kafka_queue_t;
Prd_kafka_event_t = Pointer;
PPrd_kafka_event_t = ^Prd_kafka_event_t;
Prd_kafka_topic_result_t = Pointer;
PPrd_kafka_topic_result_t = ^Prd_kafka_topic_result_t;
Prd_kafka_consumer_group_metadata_t = Pointer;
PPrd_kafka_consumer_group_metadata_t = ^Prd_kafka_consumer_group_metadata_t;
Prd_kafka_error_t = Pointer;
PPrd_kafka_error_t = ^Prd_kafka_error_t;
Prd_kafka_headers_t = Pointer;
PPrd_kafka_headers_t = ^Prd_kafka_headers_t;
(**
* @enum rd_kafka_resp_err_t
* @brief Error codes.
*
* The negative error codes delimited by two underscores
* (\c RD_KAFKA_RESP_ERR__..) denotes errors internal to librdkafka and are
* displayed as \c \"Local: \<error string..\>\", while the error codes
* delimited by a single underscore (\c RD_KAFKA_RESP_ERR_..) denote broker
* errors and are displayed as \c \"Broker: \<error string..\>\".
*
* @sa Use rd_kafka_err2str() to translate an error code a human readable string
*)
rd_kafka_resp_err_t = (
(** Begin internal error codes *)
RD_KAFKA_RESP_ERR__BEGIN = -200,
(** Received message is incorrect *)
RD_KAFKA_RESP_ERR__BAD_MSG = -199,
(** Bad/unknown compression *)
RD_KAFKA_RESP_ERR__BAD_COMPRESSION = -198,
(** Broker is going away *)
RD_KAFKA_RESP_ERR__DESTROY = -197,
(** Generic failure *)
RD_KAFKA_RESP_ERR__FAIL = -196,
(** Broker transport failure *)
RD_KAFKA_RESP_ERR__TRANSPORT = -195,
(** Critical system resource *)
RD_KAFKA_RESP_ERR__CRIT_SYS_RESOURCE = -194,
(** Failed to resolve broker *)
RD_KAFKA_RESP_ERR__RESOLVE = -193,
(** Produced message timed out*)
RD_KAFKA_RESP_ERR__MSG_TIMED_OUT = -192,
(** Reached the end of the topic+partition queue on
* the broker. Not really an error.
* This event is disabled by default,
* see the `enable.partition.eof` configuration property. *)
RD_KAFKA_RESP_ERR__PARTITION_EOF = -191,
(** Permanent: Partition does not exist in cluster. *)
RD_KAFKA_RESP_ERR__UNKNOWN_PARTITION = -190,
(** File or filesystem error *)
RD_KAFKA_RESP_ERR__FS = -189,
(** Permanent: Topic does not exist in cluster. *)
RD_KAFKA_RESP_ERR__UNKNOWN_TOPIC = -188,
(** All broker connections are down. *)
RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN = -187,
(** Invalid argument, or invalid configuration *)
RD_KAFKA_RESP_ERR__INVALID_ARG = -186,
(** Operation timed out *)
RD_KAFKA_RESP_ERR__TIMED_OUT = -185,
(** Queue is full *)
RD_KAFKA_RESP_ERR__QUEUE_FULL = -184,
(** ISR count < required.acks *)
RD_KAFKA_RESP_ERR__ISR_INSUFF = -183,
(** Broker node update *)
RD_KAFKA_RESP_ERR__NODE_UPDATE = -182,
(** SSL error *)
RD_KAFKA_RESP_ERR__SSL = -181,
(** Waiting for coordinator to become available. *)
RD_KAFKA_RESP_ERR__WAIT_COORD = -180,
(** Unknown client group *)
RD_KAFKA_RESP_ERR__UNKNOWN_GROUP = -179,
(** Operation in progress *)
RD_KAFKA_RESP_ERR__IN_PROGRESS = -178,
(** Previous operation in progress, wait for it to finish. *)
RD_KAFKA_RESP_ERR__PREV_IN_PROGRESS = -177,
(** This operation would interfere with an existing subscription *)
RD_KAFKA_RESP_ERR__EXISTING_SUBSCRIPTION = -176,
(** Assigned partitions (rebalance_cb) *)
RD_KAFKA_RESP_ERR__ASSIGN_PARTITIONS = -175,
(** Revoked partitions (rebalance_cb) *)
RD_KAFKA_RESP_ERR__REVOKE_PARTITIONS = -174,
(** Conflicting use *)
RD_KAFKA_RESP_ERR__CONFLICT = -173,
(** Wrong state *)
RD_KAFKA_RESP_ERR__STATE = -172,
(** Unknown protocol *)
RD_KAFKA_RESP_ERR__UNKNOWN_PROTOCOL = -171,
(** Not implemented *)
RD_KAFKA_RESP_ERR__NOT_IMPLEMENTED = -170,
(** Authentication failure*)
RD_KAFKA_RESP_ERR__AUTHENTICATION = -169,
(** No stored offset *)
RD_KAFKA_RESP_ERR__NO_OFFSET = -168,
(** Outdated *)
RD_KAFKA_RESP_ERR__OUTDATED = -167,
(** Timed out in queue *)
RD_KAFKA_RESP_ERR__TIMED_OUT_QUEUE = -166,
(** Feature not supported by broker *)
RD_KAFKA_RESP_ERR__UNSUPPORTED_FEATURE = -165,
(** Awaiting cache update *)
RD_KAFKA_RESP_ERR__WAIT_CACHE = -164,
(** Operation interrupted (e.g., due to yield)) *)
RD_KAFKA_RESP_ERR__INTR = -163,
(** Key serialization error *)
RD_KAFKA_RESP_ERR__KEY_SERIALIZATION = -162,
(** Value serialization error *)
RD_KAFKA_RESP_ERR__VALUE_SERIALIZATION = -161,
(** Key deserialization error *)
RD_KAFKA_RESP_ERR__KEY_DESERIALIZATION = -160,
(** Value deserialization error *)
RD_KAFKA_RESP_ERR__VALUE_DESERIALIZATION = -159,
(** Partial response *)
RD_KAFKA_RESP_ERR__PARTIAL = -158,
(** Modification attempted on read-only object *)
RD_KAFKA_RESP_ERR__READ_ONLY = -157,
(** No such entry / item not found *)
RD_KAFKA_RESP_ERR__NOENT = -156,
(** Read underflow *)
RD_KAFKA_RESP_ERR__UNDERFLOW = -155,
(** Invalid type *)
RD_KAFKA_RESP_ERR__INVALID_TYPE = -154,
(** Retry operation *)
RD_KAFKA_RESP_ERR__RETRY = -153,
(** Purged in queue *)
RD_KAFKA_RESP_ERR__PURGE_QUEUE = -152,
(** Purged in flight *)
RD_KAFKA_RESP_ERR__PURGE_INFLIGHT = -151,
(** Fatal error: see rd_kafka_fatal_error() *)
RD_KAFKA_RESP_ERR__FATAL = -150,
(** Inconsistent state *)
RD_KAFKA_RESP_ERR__INCONSISTENT = -149,
(** Gap-less ordering would not be guaranteed if proceeding *)
RD_KAFKA_RESP_ERR__GAPLESS_GUARANTEE = -148,
(** Maximum poll interval exceeded *)
RD_KAFKA_RESP_ERR__MAX_POLL_EXCEEDED = -147,
(** Unknown broker *)
RD_KAFKA_RESP_ERR__UNKNOWN_BROKER = -146,
(** Functionality not configured *)
RD_KAFKA_RESP_ERR__NOT_CONFIGURED = -145,
(** Instance has been fenced *)
RD_KAFKA_RESP_ERR__FENCED = -144,
(** Application generated error *)
RD_KAFKA_RESP_ERR__APPLICATION = -143,
(** End internal error codes *)
RD_KAFKA_RESP_ERR__END = -100,
(** Unknown broker error *)
RD_KAFKA_RESP_ERR_UNKNOWN = -1,
(** Success *)
RD_KAFKA_RESP_ERR_NO_ERROR = 0,
(** Offset out of range *)
RD_KAFKA_RESP_ERR_OFFSET_OUT_OF_RANGE = 1,
(** Invalid message *)
RD_KAFKA_RESP_ERR_INVALID_MSG = 2,
(** Unknown topic or partition *)
RD_KAFKA_RESP_ERR_UNKNOWN_TOPIC_OR_PART = 3,
(** Invalid message size *)
RD_KAFKA_RESP_ERR_INVALID_MSG_SIZE = 4,
(** Leader not available *)
RD_KAFKA_RESP_ERR_LEADER_NOT_AVAILABLE = 5,
(** Not leader for partition *)
RD_KAFKA_RESP_ERR_NOT_LEADER_FOR_PARTITION = 6,
(** Request timed out *)
RD_KAFKA_RESP_ERR_REQUEST_TIMED_OUT = 7,
(** Broker not available *)
RD_KAFKA_RESP_ERR_BROKER_NOT_AVAILABLE = 8,
(** Replica not available *)
RD_KAFKA_RESP_ERR_REPLICA_NOT_AVAILABLE = 9,
(** Message size too large *)
RD_KAFKA_RESP_ERR_MSG_SIZE_TOO_LARGE = 10,
(** StaleControllerEpochCode *)
RD_KAFKA_RESP_ERR_STALE_CTRL_EPOCH = 11,
(** Offset metadata string too large *)
RD_KAFKA_RESP_ERR_OFFSET_METADATA_TOO_LARGE = 12,
(** Broker disconnected before response received *)
RD_KAFKA_RESP_ERR_NETWORK_EXCEPTION = 13,
(** Coordinator load in progress *)
RD_KAFKA_RESP_ERR_COORDINATOR_LOAD_IN_PROGRESS = 14,
(** Coordinator not available *)
RD_KAFKA_RESP_ERR_COORDINATOR_NOT_AVAILABLE = 15,
(** Not coordinator *)
RD_KAFKA_RESP_ERR_NOT_COORDINATOR = 16,
(** Invalid topic *)
RD_KAFKA_RESP_ERR_TOPIC_EXCEPTION = 17,
(** Message batch larger than configured server segment size *)
RD_KAFKA_RESP_ERR_RECORD_LIST_TOO_LARGE = 18,
(** Not enough in-sync replicas *)
RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS = 19,
(** Message(s) written to insufficient number of in-sync replicas *)
RD_KAFKA_RESP_ERR_NOT_ENOUGH_REPLICAS_AFTER_APPEND = 20,
(** Invalid required acks value *)
RD_KAFKA_RESP_ERR_INVALID_REQUIRED_ACKS = 21,
(** Specified group generation id is not valid *)
RD_KAFKA_RESP_ERR_ILLEGAL_GENERATION = 22,
(** Inconsistent group protocol *)
RD_KAFKA_RESP_ERR_INCONSISTENT_GROUP_PROTOCOL = 23,
(** Invalid group.id *)
RD_KAFKA_RESP_ERR_INVALID_GROUP_ID = 24,
(** Unknown member *)
RD_KAFKA_RESP_ERR_UNKNOWN_MEMBER_ID = 25,
(** Invalid session timeout *)
RD_KAFKA_RESP_ERR_INVALID_SESSION_TIMEOUT = 26,
(** Group rebalance in progress *)
RD_KAFKA_RESP_ERR_REBALANCE_IN_PROGRESS = 27,
(** Commit offset data size is not valid *)
RD_KAFKA_RESP_ERR_INVALID_COMMIT_OFFSET_SIZE = 28,
(** Topic authorization failed *)
RD_KAFKA_RESP_ERR_TOPIC_AUTHORIZATION_FAILED = 29,
(** Group authorization failed *)
RD_KAFKA_RESP_ERR_GROUP_AUTHORIZATION_FAILED = 30,
(** Cluster authorization failed *)
RD_KAFKA_RESP_ERR_CLUSTER_AUTHORIZATION_FAILED = 31,
(** Invalid timestamp *)
RD_KAFKA_RESP_ERR_INVALID_TIMESTAMP = 32,
(** Unsupported SASL mechanism *)
RD_KAFKA_RESP_ERR_UNSUPPORTED_SASL_MECHANISM = 33,
(** Illegal SASL state *)
RD_KAFKA_RESP_ERR_ILLEGAL_SASL_STATE = 34,
(** Unuspported version *)
RD_KAFKA_RESP_ERR_UNSUPPORTED_VERSION = 35,
(** Topic already exists *)
RD_KAFKA_RESP_ERR_TOPIC_ALREADY_EXISTS = 36,
(** Invalid number of partitions *)
RD_KAFKA_RESP_ERR_INVALID_PARTITIONS = 37,
(** Invalid replication factor *)
RD_KAFKA_RESP_ERR_INVALID_REPLICATION_FACTOR = 38,
(** Invalid replica assignment *)
RD_KAFKA_RESP_ERR_INVALID_REPLICA_ASSIGNMENT = 39,
(** Invalid config *)
RD_KAFKA_RESP_ERR_INVALID_CONFIG = 40,
(** Not controller for cluster *)
RD_KAFKA_RESP_ERR_NOT_CONTROLLER = 41,
(** Invalid request *)
RD_KAFKA_RESP_ERR_INVALID_REQUEST = 42,
(** Message format on broker does not support request *)
RD_KAFKA_RESP_ERR_UNSUPPORTED_FOR_MESSAGE_FORMAT = 43,
(** Policy violation *)
RD_KAFKA_RESP_ERR_POLICY_VIOLATION = 44,
(** Broker received an out of order sequence number *)
RD_KAFKA_RESP_ERR_OUT_OF_ORDER_SEQUENCE_NUMBER = 45,
(** Broker received a duplicate sequence number *)
RD_KAFKA_RESP_ERR_DUPLICATE_SEQUENCE_NUMBER = 46,
(** Producer attempted an operation with an old epoch *)
RD_KAFKA_RESP_ERR_INVALID_PRODUCER_EPOCH = 47,
(** Producer attempted a transactional operation in an invalid state *)
RD_KAFKA_RESP_ERR_INVALID_TXN_STATE = 48,
(** Producer attempted to use a producer id which is not
* currently assigned to its transactional id *)
RD_KAFKA_RESP_ERR_INVALID_PRODUCER_ID_MAPPING = 49,
(** Transaction timeout is larger than the maximum
* value allowed by the broker's max.transaction.timeout.ms *)
RD_KAFKA_RESP_ERR_INVALID_TRANSACTION_TIMEOUT = 50,
(** Producer attempted to update a transaction while another
* concurrent operation on the same transaction was ongoing *)
RD_KAFKA_RESP_ERR_CONCURRENT_TRANSACTIONS = 51,
(** Indicates that the transaction coordinator sending a
* WriteTxnMarker is no longer the current coordinator for a
* given producer *)
RD_KAFKA_RESP_ERR_TRANSACTION_COORDINATOR_FENCED = 52,
(** Transactional Id authorization failed *)
RD_KAFKA_RESP_ERR_TRANSACTIONAL_ID_AUTHORIZATION_FAILED = 53,
(** Security features are disabled *)
RD_KAFKA_RESP_ERR_SECURITY_DISABLED = 54,
(** Operation not attempted *)
RD_KAFKA_RESP_ERR_OPERATION_NOT_ATTEMPTED = 55,
(** Disk error when trying to access log file on the disk *)
RD_KAFKA_RESP_ERR_KAFKA_STORAGE_ERROR = 56,
(** The user-specified log directory is not found in the broker config *)
RD_KAFKA_RESP_ERR_LOG_DIR_NOT_FOUND = 57,
(** SASL Authentication failed *)
RD_KAFKA_RESP_ERR_SASL_AUTHENTICATION_FAILED = 58,
(** Unknown Producer Id *)
RD_KAFKA_RESP_ERR_UNKNOWN_PRODUCER_ID = 59,
(** Partition reassignment is in progress *)
RD_KAFKA_RESP_ERR_REASSIGNMENT_IN_PROGRESS = 60,
(** Delegation Token feature is not enabled *)
RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTH_DISABLED = 61,
(** Delegation Token is not found on server *)
RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_NOT_FOUND = 62,
(** Specified Principal is not valid Owner/Renewer *)
RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_OWNER_MISMATCH = 63,
(** Delegation Token requests are not allowed on this connection *)
RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_REQUEST_NOT_ALLOWED = 64,
(** Delegation Token authorization failed *)
RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_AUTHORIZATION_FAILED = 65,
(** Delegation Token is expired *)
RD_KAFKA_RESP_ERR_DELEGATION_TOKEN_EXPIRED = 66,
(** Supplied principalType is not supported *)
RD_KAFKA_RESP_ERR_INVALID_PRINCIPAL_TYPE = 67,
(** The group is not empty *)
RD_KAFKA_RESP_ERR_NON_EMPTY_GROUP = 68,
(** The group id does not exist *)
RD_KAFKA_RESP_ERR_GROUP_ID_NOT_FOUND = 69,
(** The fetch session ID was not found *)
RD_KAFKA_RESP_ERR_FETCH_SESSION_ID_NOT_FOUND = 70,
(** The fetch session epoch is invalid *)
RD_KAFKA_RESP_ERR_INVALID_FETCH_SESSION_EPOCH = 71,
(** No matching listener *)
RD_KAFKA_RESP_ERR_LISTENER_NOT_FOUND = 72,
(** Topic deletion is disabled *)
RD_KAFKA_RESP_ERR_TOPIC_DELETION_DISABLED = 73,
(** Leader epoch is older than broker epoch *)
RD_KAFKA_RESP_ERR_FENCED_LEADER_EPOCH = 74,
(** Leader epoch is newer than broker epoch *)
RD_KAFKA_RESP_ERR_UNKNOWN_LEADER_EPOCH = 75,
(** Unsupported compression type *)
RD_KAFKA_RESP_ERR_UNSUPPORTED_COMPRESSION_TYPE = 76,
(** Broker epoch has changed *)
RD_KAFKA_RESP_ERR_STALE_BROKER_EPOCH = 77,
(** Leader high watermark is not caught up *)
RD_KAFKA_RESP_ERR_OFFSET_NOT_AVAILABLE = 78,
(** Group member needs a valid member ID *)
RD_KAFKA_RESP_ERR_MEMBER_ID_REQUIRED = 79,
(** Preferred leader was not available *)
RD_KAFKA_RESP_ERR_PREFERRED_LEADER_NOT_AVAILABLE = 80,
(** Consumer group has reached maximum size *)
RD_KAFKA_RESP_ERR_GROUP_MAX_SIZE_REACHED = 81,
(** Static consumer fenced by other consumer with same
* group.instance.id. *)
RD_KAFKA_RESP_ERR_FENCED_INSTANCE_ID = 82,
(** Static consumer fenced by other consumer with same
* group.instance.id. *)
RD_KAFKA_RESP_ERR_END_ALL = 83);
Prd_kafka_resp_err_t = ^rd_kafka_resp_err_t;
(**
* @brief Error code value, name and description.
* Typically for use with language bindings to automatically expose
* the full set of librdkafka error codes.
*)
rd_kafka_err_desc = record
(** Error code *)
code: rd_kafka_resp_err_t;
(** Error name, same as code enum sans prefix *)
name: PUTF8Char;
(** Human readable error description. *)
desc: PUTF8Char;
end;
(**
* @brief Generic place holder for a specific Topic+Partition.
*
* @sa rd_kafka_topic_partition_list_new()
*)
rd_kafka_topic_partition_s = record
(** Topic name *)
topic: PUTF8Char;
(** Partition *)
partition: Int32;
(** Offset *)
offset: Int64;
(** Metadata *)
metadata: Pointer;
(** Metadata size *)
metadata_size: NativeUInt;
(** Opaque value for application use *)
opaque: Pointer;
(** Error code, depending on use. *)
err: rd_kafka_resp_err_t;
(** INTERNAL USE ONLY,
* INITIALIZE TO ZERO, DO NOT TOUCH *)
_private: Pointer;
end;
rd_kafka_topic_partition_t = rd_kafka_topic_partition_s;
Prd_kafka_topic_partition_t = ^rd_kafka_topic_partition_t;
(**
* @brief A growable list of Topic+Partitions.
*
*)
rd_kafka_topic_partition_list_s = record
(** Current number of elements *)
cnt: Integer;
(** Current allocated size *)
size: Integer;
(** Element array[] *)
elems: array of rd_kafka_topic_partition_t;
end;
rd_kafka_topic_partition_list_t = rd_kafka_topic_partition_list_s;
Prd_kafka_topic_partition_list_t = ^rd_kafka_topic_partition_list_t;
PPrd_kafka_topic_partition_list_t = ^Prd_kafka_topic_partition_list_t;
(**
* @enum rd_kafka_vtype_t
*
* @brief Var-arg tag types
*
* @sa rd_kafka_producev()
*)
rd_kafka_vtype_t = (
(** va-arg sentinel *)
RD_KAFKA_VTYPE_END = 0,
(** (const char * ) Topic name *)
RD_KAFKA_VTYPE_TOPIC = 1,
(** (rd_kafka_topic_t * ) Topic handle *)
RD_KAFKA_VTYPE_RKT = 2,
(** (int32_t) Partition *)
RD_KAFKA_VTYPE_PARTITION = 3,
(** (void *, size_t) Message value (payload)*)
RD_KAFKA_VTYPE_VALUE = 4,
(** (void *, size_t) Message key *)
RD_KAFKA_VTYPE_KEY = 5,
(** (void * ) Per-message application opaque
* value. This is the same as
* the _private field in
* rd_kafka_message_t, also known
* as the msg_opaque. *)
RD_KAFKA_VTYPE_OPAQUE = 6,
(** (int) RD_KAFKA_MSG_F_.. flags *)
RD_KAFKA_VTYPE_MSGFLAGS = 7,
(** (int64_t) Milliseconds since epoch UTC *)
RD_KAFKA_VTYPE_TIMESTAMP = 8,
(** (const char *, const void *, ssize_t)
* Message Header *)
RD_KAFKA_VTYPE_HEADER = 9,
(** (rd_kafka_headers_t * ) Headers list *)
RD_KAFKA_VTYPE_HEADERS = 10);
Prd_kafka_vtype_t = ^rd_kafka_vtype_t;
_anonymous_type_1 = record
ptr: Pointer;
size: NativeUInt;
end;
P_anonymous_type_1 = ^_anonymous_type_1;
_anonymous_type_2 = record
name: PUTF8Char;
val: Pointer;
size: ssize_t;
end;
P_anonymous_type_2 = ^_anonymous_type_2;
(** Value union, see RD_KAFKA_V_.. macros for which field to use. *)
_anonymous_type_3 = record
case Integer of
0: (cstr: PUTF8Char);
1: (rkt: Prd_kafka_topic_t);
2: (i: Integer);
3: (i32: Int32);
4: (i64: Int64);
5: (mem: _anonymous_type_1);
6: (header: _anonymous_type_2);
7: (headers: Prd_kafka_headers_t);
8: (ptr: Pointer);
(** Padding size for future-proofness *)
9: (_pad: array [0..63] of UTF8Char);
end;
P_anonymous_type_3 = ^_anonymous_type_3;
(**
* @brief VTYPE + argument container for use with rd_kafka_produce_va()
*
* See RD_KAFKA_V_..() macros below for which union field corresponds
* to which RD_KAFKA_VTYPE_...
*)
rd_kafka_vu_s = record
(** RD_KAFKA_VTYPE_.. *)
vtype: rd_kafka_vtype_t;
u: _anonymous_type_3;
end;
rd_kafka_vu_t = rd_kafka_vu_s;
Prd_kafka_vu_t = ^rd_kafka_vu_t;
(**
* @brief A Kafka message as returned by the \c rd_kafka_consume*() family
* of functions as well as provided to the Producer \c dr_msg_cb().
*
* For the consumer this object has two purposes:
* - provide the application with a consumed message. (\c err == 0)
* - report per-topic+partition consumer errors (\c err != 0)
*
* The application must check \c err to decide what action to take.
*
* When the application is finished with a message it must call
* rd_kafka_message_destroy() unless otherwise noted.
*)
rd_kafka_message_s = record
(** Non-zero for error signaling. *)
err: rd_kafka_resp_err_t;
(** Topic *)
rkt: Prd_kafka_topic_t;
(** Partition *)
partition: Int32;
(** Producer: original message payload.
* Consumer: Depends on the value of \c err :
* - \c err==0: Message payload.
* - \c err!=0: Error string *)
payload: Pointer;
(** Depends on the value of \c err :
* - \c err==0: Message payload length
* - \c err!=0: Error string length *)
len: NativeUInt;
(** Depends on the value of \c err :
* - \c err==0: Optional message key *)
key: Pointer;
(** Depends on the value of \c err :
* - \c err==0: Optional message key length*)
key_len: NativeUInt;
(** Consumer:
* - Message offset (or offset for error
* if \c err!=0 if applicable).
* Producer, dr_msg_cb:
* Message offset assigned by broker.
* May be RD_KAFKA_OFFSET_INVALID
* for retried messages when
* idempotence is enabled. *)
offset: Int64;
(** Consumer:
* - rdkafka private pointer: DO NOT MODIFY
* Producer:
* - dr_msg_cb:
* msg_opaque from produce() call or
* RD_KAFKA_V_OPAQUE from producev(). *)
_private: Pointer;
end;
rd_kafka_message_t = rd_kafka_message_s;
Prd_kafka_message_t = ^rd_kafka_message_t;
PPrd_kafka_message_t = ^Prd_kafka_message_t;
(**
* @enum rd_kafka_msg_status_t
* @brief Message persistence status can be used by the application to
* find out if a produced message was persisted in the topic log.
*)
rd_kafka_msg_status_t = (
(** Message was never transmitted to the broker, or failed with
* an error indicating it was not written to the log.
* Application retry risks ordering, but not duplication. *)
RD_KAFKA_MSG_STATUS_NOT_PERSISTED = 0,
(** Message was transmitted to broker, but no acknowledgement was
* received.
* Application retry risks ordering and duplication. *)
RD_KAFKA_MSG_STATUS_POSSIBLY_PERSISTED = 1,
(** Message was written to the log and acknowledged by the broker.
* No reason for application to retry.
* Note: this value should only be trusted with \c acks=all. *)
RD_KAFKA_MSG_STATUS_PERSISTED = 2);
Prd_kafka_msg_status_t = ^rd_kafka_msg_status_t;
(**
* @enum rd_kafka_conf_res_t
* @brief Configuration result type
*)
rd_kafka_conf_res_t = (
(** Unknown configuration name. *)
RD_KAFKA_CONF_UNKNOWN = -2,
(** Invalid configuration value. *)
RD_KAFKA_CONF_INVALID = -1,
(** Configuration okay *)
RD_KAFKA_CONF_OK = 0);
Prd_kafka_conf_res_t = ^rd_kafka_conf_res_t;
(**
* @enum rd_kafka_cert_type_t
*
* @brief SSL certificate type
*
* @sa rd_kafka_conf_set_ssl_cert
*)
rd_kafka_cert_type_t = (
(** Client's public key *)
RD_KAFKA_CERT_PUBLIC_KEY = 0,
(** Client's private key *)
RD_KAFKA_CERT_PRIVATE_KEY = 1,
(** CA certificate *)
RD_KAFKA_CERT_CA = 2,
RD_KAFKA_CERT__CNT = 3);
Prd_kafka_cert_type_t = ^rd_kafka_cert_type_t;
(**
* @enum rd_kafka_cert_enc_t
*
* @brief SSL certificate encoding
*
* @sa rd_kafka_conf_set_ssl_cert
*)
rd_kafka_cert_enc_t = (
(** PKCS#12 *)
RD_KAFKA_CERT_ENC_PKCS12 = 0,
(** DER / binary X.509 ASN1 *)
RD_KAFKA_CERT_ENC_DER = 1,
(** PEM *)
RD_KAFKA_CERT_ENC_PEM = 2,
RD_KAFKA_CERT_ENC__CNT = 3);
Prd_kafka_cert_enc_t = ^rd_kafka_cert_enc_t;
(**
* @brief Broker information
*)
rd_kafka_metadata_broker = record
(** Broker Id *)
id: Int32;
(** Broker hostname *)
host: PUTF8Char;
(** Broker listening port *)
port: Integer;
end;
rd_kafka_metadata_broker_t = rd_kafka_metadata_broker;
(**
* @brief Partition information
*)
rd_kafka_metadata_partition = record
(** Partition Id *)
id: Int32;
(** Partition error reported by broker *)
err: rd_kafka_resp_err_t;
(** Leader broker *)
leader: Int32;
(** Number of brokers in \p replicas *)
replica_cnt: Integer;
(** Replica brokers *)
replicas: array of Int32;
(** Number of ISR brokers in \p isrs *)
isr_cnt: Integer;
(** In-Sync-Replica brokers *)
isrs: array of Int32;
end;
rd_kafka_metadata_partition_t = rd_kafka_metadata_partition;
(**
* @brief Topic information
*)
rd_kafka_metadata_topic = record
(** Topic name *)
topic: PUTF8Char;
(** Number of partitions in \p partitions*)
partition_cnt: Integer;
(** Partitions *)
partitions: array of rd_kafka_metadata_partition;
(** Topic error reported by broker *)
err: rd_kafka_resp_err_t;
end;
rd_kafka_metadata_topic_t = rd_kafka_metadata_topic;
(**
* @brief Metadata container
*)
rd_kafka_metadata_ = record
(** Number of brokers in \p brokers *)
broker_cnt: Integer;
(** Brokers *)
brokers: array of rd_kafka_metadata_broker;
(** Number of topics in \p topics *)
topic_cnt: Integer;
(** Topics *)
topics: array of rd_kafka_metadata_topic;
(** Broker originating this metadata *)
orig_broker_id: Int32;
(** Name of originating broker *)
orig_broker_name: PUTF8Char;
end;
rd_kafka_metadata_t = rd_kafka_metadata_;
(**
* @brief Group member information
*
* For more information on \p member_metadata format, see
* https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol#AGuideToTheKafkaProtocol-GroupMembershipAPI
*
*)
rd_kafka_group_member_info = record
(** Member id (generated by broker) *)
member_id: PUTF8Char;
(** Client's \p client.id *)
client_id: PUTF8Char;
(** Client's hostname *)
client_host: PUTF8Char;
(** Member metadata (binary),
* format depends on \p protocol_type. *)
member_metadata: Pointer;
(** Member metadata size in bytes *)
member_metadata_size: Integer;
(** Member assignment (binary),
* format depends on \p protocol_type. *)
member_assignment: Pointer;
(** Member assignment size in bytes *)
member_assignment_size: Integer;
end;
(**
* @brief Group information
*)
rd_kafka_group_info = record
(** Originating broker info *)
broker: rd_kafka_metadata_broker;
(** Group name *)
group: PUTF8Char;
(** Broker-originated error *)
err: rd_kafka_resp_err_t;
(** Group state *)
state: PUTF8Char;
(** Group protocol type *)
protocol_type: PUTF8Char;
(** Group protocol *)
protocol: PUTF8Char;
(** Group members *)
members: array of rd_kafka_group_member_info;
(** Group member count *)
member_cnt: Integer;
end;
(**
* @brief List of groups
*
* @sa rd_kafka_group_list_destroy() to release list memory.
*)
rd_kafka_group_list = record
(** Groups *)
groups: array of rd_kafka_group_info;
(** Group count *)
group_cnt: Integer;
end;
(**
* @enum rd_kafka_thread_type_t
*
* @brief librdkafka internal thread type.
*
* @sa rd_kafka_interceptor_add_on_thread_start()
*)
rd_kafka_thread_type_t = (
(** librdkafka's internal main thread *)
RD_KAFKA_THREAD_MAIN = 0,
(** Background thread (if enabled) *)
RD_KAFKA_THREAD_BACKGROUND = 1,
(** Per-broker thread *)
RD_KAFKA_THREAD_BROKER = 2);
Prd_kafka_thread_type_t = ^rd_kafka_thread_type_t;
(**
* @brief Event types
*)
rd_kafka_event_type_t = Integer;
Prd_kafka_CreateTopics_result_t = Pointer;
PPrd_kafka_CreateTopics_result_t = ^Prd_kafka_CreateTopics_result_t;
Prd_kafka_DeleteTopics_result_t = Pointer;
PPrd_kafka_DeleteTopics_result_t = ^Prd_kafka_DeleteTopics_result_t;
Prd_kafka_CreatePartitions_result_t = Pointer;
PPrd_kafka_CreatePartitions_result_t = ^Prd_kafka_CreatePartitions_result_t;
Prd_kafka_AlterConfigs_result_t = Pointer;
PPrd_kafka_AlterConfigs_result_t = ^Prd_kafka_AlterConfigs_result_t;
Prd_kafka_DescribeConfigs_result_t = Pointer;
PPrd_kafka_DescribeConfigs_result_t = ^Prd_kafka_DescribeConfigs_result_t;
(**
* @brief Plugin's configuration initializer method called each time the
* library is referenced from configuration (even if previously loaded by
* another client instance).
*
* @remark This method MUST be implemented by plugins and have the symbol name
* \c conf_init
*
* @param conf Configuration set up to this point.
* @param plug_opaquep Plugin can set this pointer to a per-configuration
* opaque pointer.
* @param errstr String buffer of size \p errstr_size where plugin must write
* a human readable error string in the case the initializer
* fails (returns non-zero).
*
* @remark A plugin may add an on_conf_destroy() interceptor to clean up
* plugin-specific resources created in the plugin's conf_init() method.
*
* @returns RD_KAFKA_RESP_ERR_NO_ERROR on success or an error code on error.
*)
Prd_kafka_plugin_f_conf_init_t = function(conf: Prd_kafka_conf_t; plug_opaquep: PPointer; errstr: PUTF8Char; errstr_size: NativeUInt): rd_kafka_resp_err_t; cdecl;
(**
* @brief on_conf_set() is called from rd_kafka_*_conf_set() in the order
* the interceptors were added.
*
* @param ic_opaque The interceptor's opaque pointer specified in ..add..().
* @param name The configuration property to set.
* @param val The configuration value to set, or NULL for reverting to default
* in which case the previous value should be freed.
* @param errstr A human readable error string in case the interceptor fails.
* @param errstr_size Maximum space (including \0) in \p errstr.
*
* @returns RD_KAFKA_CONF_RES_OK if the property was known and successfully
* handled by the interceptor, RD_KAFKA_CONF_RES_INVALID if the
* property was handled by the interceptor but the value was invalid,
* or RD_KAFKA_CONF_RES_UNKNOWN if the interceptor did not handle
* this property, in which case the property is passed on on the
* interceptor in the chain, finally ending up at the built-in
* configuration handler.
*)
Prd_kafka_interceptor_f_on_conf_set_t = function(conf: Prd_kafka_conf_t; const name: PUTF8Char; const val: PUTF8Char; errstr: PUTF8Char; errstr_size: NativeUInt; ic_opaque: Pointer): rd_kafka_conf_res_t; cdecl;
(**
* @brief on_conf_dup() is called from rd_kafka_conf_dup() in the
* order the interceptors were added and is used to let
* an interceptor re-register its conf interecptors with a new
* opaque value.
* The on_conf_dup() method is called prior to the configuration from
* \p old_conf being copied to \p new_conf.
*
* @param ic_opaque The interceptor's opaque pointer specified in ..add..().
*
* @returns RD_KAFKA_RESP_ERR_NO_ERROR on success or an error code
* on failure (which is logged but otherwise ignored).
*
* @remark No on_conf_* interceptors are copied to the new configuration
* object on rd_kafka_conf_dup().
*)
Prd_kafka_interceptor_f_on_conf_dup_t = function(new_conf: Prd_kafka_conf_t; const old_conf: Prd_kafka_conf_t; filter_cnt: NativeUInt; filter: PPUTF8Char; ic_opaque: Pointer): rd_kafka_resp_err_t; cdecl;
(**
* @brief on_conf_destroy() is called from rd_kafka_*_conf_destroy() in the
* order the interceptors were added.
*
* @param ic_opaque The interceptor's opaque pointer specified in ..add..().