@@ -179,6 +179,7 @@ static bool SetDelegates(Type nativeMethodsClass)
179179 _message_timestamp = ( messageTimestampDelegate ) methods . Single ( m => m . Name == "rd_kafka_message_timestamp" ) . CreateDelegate ( typeof ( messageTimestampDelegate ) ) ;
180180 _message_headers = ( messageHeadersDelegate ) methods . Single ( m => m . Name == "rd_kafka_message_headers" ) . CreateDelegate ( typeof ( messageHeadersDelegate ) ) ;
181181 _message_status = ( Func < IntPtr , PersistenceStatus > ) methods . Single ( m => m . Name == "rd_kafka_message_status" ) . CreateDelegate ( typeof ( Func < IntPtr , PersistenceStatus > ) ) ;
182+ _message_leader_epoch = ( messageLeaderEpoch ) methods . Single ( m => m . Name == "rd_kafka_message_leader_epoch" ) . CreateDelegate ( typeof ( messageLeaderEpoch ) ) ;
182183 _message_destroy = ( Action < IntPtr > ) methods . Single ( m => m . Name == "rd_kafka_message_destroy" ) . CreateDelegate ( typeof ( Action < IntPtr > ) ) ;
183184 _conf_new = ( Func < SafeConfigHandle > ) methods . Single ( m => m . Name == "rd_kafka_conf_new" ) . CreateDelegate ( typeof ( Func < SafeConfigHandle > ) ) ;
184185 _conf_destroy = ( Action < IntPtr > ) methods . Single ( m => m . Name == "rd_kafka_conf_destroy" ) . CreateDelegate ( typeof ( Action < IntPtr > ) ) ;
@@ -208,6 +209,8 @@ static bool SetDelegates(Type nativeMethodsClass)
208209 _topic_conf_set_partitioner_cb = ( Action < IntPtr , PartitionerDelegate > ) methods . Single ( m => m . Name == "rd_kafka_topic_conf_set_partitioner_cb" ) . CreateDelegate ( typeof ( Action < IntPtr , PartitionerDelegate > ) ) ;
209210 _topic_conf_set_opaque = ( Action < IntPtr , IntPtr > ) methods . Single ( m => m . Name == "rd_kafka_topic_conf_set_opaque" ) . CreateDelegate ( typeof ( Action < IntPtr , IntPtr > ) ) ;
210211 _topic_partition_available = ( Func < IntPtr , int , bool > ) methods . Single ( m => m . Name == "rd_kafka_topic_partition_available" ) . CreateDelegate ( typeof ( Func < IntPtr , int , bool > ) ) ;
212+ _topic_partition_get_leader_epoch = ( Func < IntPtr , int > ) methods . Single ( m => m . Name == "rd_kafka_topic_partition_get_leader_epoch" ) . CreateDelegate ( typeof ( Func < IntPtr , int > ) ) ;
213+ _topic_partition_set_leader_epoch = ( Action < IntPtr , int > ) methods . Single ( m => m . Name == "rd_kafka_topic_partition_set_leader_epoch" ) . CreateDelegate ( typeof ( Action < IntPtr , int > ) ) ;
211214 _init_transactions = ( Func < IntPtr , IntPtr , IntPtr > ) methods . Single ( m => m . Name == "rd_kafka_init_transactions" ) . CreateDelegate ( typeof ( Func < IntPtr , IntPtr , IntPtr > ) ) ;
212215 _begin_transaction = ( Func < IntPtr , IntPtr > ) methods . Single ( m => m . Name == "rd_kafka_begin_transaction" ) . CreateDelegate ( typeof ( Func < IntPtr , IntPtr > ) ) ;
213216 _commit_transaction = ( Func < IntPtr , IntPtr , IntPtr > ) methods . Single ( m => m . Name == "rd_kafka_commit_transaction" ) . CreateDelegate ( typeof ( Func < IntPtr , IntPtr , IntPtr > ) ) ;
@@ -247,6 +250,7 @@ static bool SetDelegates(Type nativeMethodsClass)
247250 _pause_partitions = ( Func < IntPtr , IntPtr , ErrorCode > ) methods . Single ( m => m . Name == "rd_kafka_pause_partitions" ) . CreateDelegate ( typeof ( Func < IntPtr , IntPtr , ErrorCode > ) ) ;
248251 _resume_partitions = ( Func < IntPtr , IntPtr , ErrorCode > ) methods . Single ( m => m . Name == "rd_kafka_resume_partitions" ) . CreateDelegate ( typeof ( Func < IntPtr , IntPtr , ErrorCode > ) ) ;
249252 _seek = ( Func < IntPtr , int , long , IntPtr , ErrorCode > ) methods . Single ( m => m . Name == "rd_kafka_seek" ) . CreateDelegate ( typeof ( Func < IntPtr , int , long , IntPtr , ErrorCode > ) ) ;
253+ _seek_partitions = ( Func < IntPtr , IntPtr , IntPtr , IntPtr > ) methods . Single ( m => m . Name == "rd_kafka_seek_partitions" ) . CreateDelegate ( typeof ( Func < IntPtr , IntPtr , IntPtr , IntPtr > ) ) ;
250254 _position = ( Func < IntPtr , IntPtr , ErrorCode > ) methods . Single ( m => m . Name == "rd_kafka_position" ) . CreateDelegate ( typeof ( Func < IntPtr , IntPtr , ErrorCode > ) ) ;
251255 _produceva = ( Produceva ) methods . Single ( m => m . Name == "rd_kafka_produceva" ) . CreateDelegate ( typeof ( Produceva ) ) ;
252256 _flush = ( Flush ) methods . Single ( m => m . Name == "rd_kafka_flush" ) . CreateDelegate ( typeof ( Flush ) ) ;
@@ -782,6 +786,10 @@ internal static ErrorCode header_get_all(
782786 private static messageHeadersDelegate _message_headers ;
783787 internal static ErrorCode message_headers ( IntPtr rkmessage , out IntPtr hdrs ) => _message_headers ( rkmessage , out hdrs ) ;
784788
789+ internal delegate int messageLeaderEpoch ( IntPtr rkmessage ) ;
790+ private static messageLeaderEpoch _message_leader_epoch ;
791+ internal static int message_leader_epoch ( IntPtr rkmessage ) => _message_leader_epoch ( rkmessage ) ;
792+
785793 private static Action < IntPtr > _message_destroy ;
786794 internal static void message_destroy ( IntPtr rkmessage ) => _message_destroy ( rkmessage ) ;
787795
@@ -901,6 +909,15 @@ internal static void topic_conf_set_partitioner_cb(
901909 internal static bool topic_partition_available ( IntPtr rkt , int partition )
902910 => _topic_partition_available ( rkt , partition ) ;
903911
912+
913+ private static Func < IntPtr , int > _topic_partition_get_leader_epoch ;
914+ internal static int topic_partition_get_leader_epoch ( IntPtr rkt )
915+ => _topic_partition_get_leader_epoch ( rkt ) ;
916+
917+ private static Action < IntPtr , int > _topic_partition_set_leader_epoch ;
918+ internal static void topic_partition_set_leader_epoch ( IntPtr rkt , int leader_epoch )
919+ => _topic_partition_set_leader_epoch ( rkt , leader_epoch ) ;
920+
904921 private static Func < IntPtr , IntPtr , IntPtr > _init_transactions ;
905922 internal static IntPtr init_transactions ( IntPtr rk , IntPtr timeout )
906923 => _init_transactions ( rk , timeout ) ;
@@ -1064,6 +1081,10 @@ internal static ErrorCode resume_partitions(IntPtr rk, IntPtr partitions)
10641081 private static Func < IntPtr , int , long , IntPtr , ErrorCode > _seek ;
10651082 internal static ErrorCode seek ( IntPtr rkt , int partition , long offset , IntPtr timeout_ms )
10661083 => _seek ( rkt , partition , offset , timeout_ms ) ;
1084+
1085+ private static Func < IntPtr , IntPtr , IntPtr , IntPtr > _seek_partitions ;
1086+ internal static IntPtr seek_partitions ( IntPtr rkt , IntPtr partitions , IntPtr timeout_ms )
1087+ => _seek_partitions ( rkt , partitions , timeout_ms ) ;
10671088
10681089 private static Func < IntPtr , IntPtr , IntPtr , ErrorCode > _committed ;
10691090 internal static ErrorCode committed ( IntPtr rk , IntPtr partitions , IntPtr timeout_ms )
0 commit comments