rdkafka 0.24.2-aarch64-linux-gnu → 0.25.1-aarch64-linux-gnu

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +18 -0
  3. data/Gemfile +8 -0
  4. data/Gemfile.lint +14 -0
  5. data/Gemfile.lint.lock +123 -0
  6. data/README.md +2 -1
  7. data/Rakefile +21 -21
  8. data/docker-compose-ssl.yml +1 -1
  9. data/docker-compose.yml +1 -1
  10. data/ext/librdkafka.so +0 -0
  11. data/lib/rdkafka/abstract_handle.rb +23 -5
  12. data/lib/rdkafka/admin/acl_binding_result.rb +5 -5
  13. data/lib/rdkafka/admin/config_resource_binding_result.rb +1 -0
  14. data/lib/rdkafka/admin/create_acl_handle.rb +7 -4
  15. data/lib/rdkafka/admin/create_acl_report.rb +3 -2
  16. data/lib/rdkafka/admin/create_partitions_handle.rb +8 -5
  17. data/lib/rdkafka/admin/create_partitions_report.rb +1 -0
  18. data/lib/rdkafka/admin/create_topic_handle.rb +8 -5
  19. data/lib/rdkafka/admin/create_topic_report.rb +3 -0
  20. data/lib/rdkafka/admin/delete_acl_handle.rb +9 -6
  21. data/lib/rdkafka/admin/delete_acl_report.rb +5 -3
  22. data/lib/rdkafka/admin/delete_groups_handle.rb +10 -5
  23. data/lib/rdkafka/admin/delete_groups_report.rb +3 -0
  24. data/lib/rdkafka/admin/delete_topic_handle.rb +8 -5
  25. data/lib/rdkafka/admin/delete_topic_report.rb +3 -0
  26. data/lib/rdkafka/admin/describe_acl_handle.rb +9 -6
  27. data/lib/rdkafka/admin/describe_acl_report.rb +5 -3
  28. data/lib/rdkafka/admin/describe_configs_handle.rb +7 -4
  29. data/lib/rdkafka/admin/describe_configs_report.rb +7 -1
  30. data/lib/rdkafka/admin/incremental_alter_configs_handle.rb +7 -4
  31. data/lib/rdkafka/admin/incremental_alter_configs_report.rb +7 -1
  32. data/lib/rdkafka/admin.rb +194 -132
  33. data/lib/rdkafka/bindings.rb +155 -107
  34. data/lib/rdkafka/callbacks.rb +81 -21
  35. data/lib/rdkafka/config.rb +36 -24
  36. data/lib/rdkafka/consumer/headers.rb +3 -2
  37. data/lib/rdkafka/consumer/message.rb +12 -11
  38. data/lib/rdkafka/consumer/partition.rb +8 -4
  39. data/lib/rdkafka/consumer/topic_partition_list.rb +18 -18
  40. data/lib/rdkafka/consumer.rb +247 -42
  41. data/lib/rdkafka/defaults.rb +106 -0
  42. data/lib/rdkafka/error.rb +28 -13
  43. data/lib/rdkafka/helpers/oauth.rb +11 -6
  44. data/lib/rdkafka/helpers/time.rb +5 -0
  45. data/lib/rdkafka/metadata.rb +45 -21
  46. data/lib/rdkafka/native_kafka.rb +89 -4
  47. data/lib/rdkafka/producer/delivery_handle.rb +5 -5
  48. data/lib/rdkafka/producer/delivery_report.rb +8 -4
  49. data/lib/rdkafka/producer/partitions_count_cache.rb +29 -19
  50. data/lib/rdkafka/producer.rb +165 -79
  51. data/lib/rdkafka/version.rb +6 -3
  52. data/lib/rdkafka.rb +1 -0
  53. data/package-lock.json +331 -0
  54. data/package.json +9 -0
  55. data/rdkafka.gemspec +39 -47
  56. data/renovate.json +22 -8
  57. metadata +7 -86
@@ -2,11 +2,12 @@
2
2
 
3
3
  module Rdkafka
4
4
  class Admin
5
+ # Handle for delete topic operation
5
6
  class DeleteTopicHandle < AbstractHandle
6
7
  layout :pending, :bool,
7
- :response, :int,
8
- :error_string, :pointer,
9
- :result_name, :pointer
8
+ :response, :int,
9
+ :error_string, :pointer,
10
+ :result_name, :pointer
10
11
 
11
12
  # @return [String] the name of the operation
12
13
  def operation_name
@@ -18,10 +19,12 @@ module Rdkafka
18
19
  DeleteTopicReport.new(self[:error_string], self[:result_name])
19
20
  end
20
21
 
22
+ # Raises an error if the operation failed
23
+ # @raise [RdkafkaError]
21
24
  def raise_error
22
25
  raise RdkafkaError.new(
23
- self[:response],
24
- broker_message: DeleteTopicReport.new(self[:error_string], self[:result_name]).error_string
26
+ self[:response],
27
+ broker_message: DeleteTopicReport.new(self[:error_string], self[:result_name]).error_string
25
28
  )
26
29
  end
27
30
  end
@@ -2,6 +2,7 @@
2
2
 
3
3
  module Rdkafka
4
4
  class Admin
5
+ # Report for delete topic operation result
5
6
  class DeleteTopicReport
6
7
  # Any error message generated from the DeleteTopic
7
8
  # @return [String]
@@ -11,6 +12,8 @@ module Rdkafka
11
12
  # @return [String]
12
13
  attr_reader :result_name
13
14
 
15
+ # @param error_string [FFI::Pointer] pointer to error string
16
+ # @param result_name [FFI::Pointer] pointer to topic name
14
17
  def initialize(error_string, result_name)
15
18
  if error_string != FFI::Pointer::NULL
16
19
  @error_string = error_string.read_string
@@ -2,12 +2,13 @@
2
2
 
3
3
  module Rdkafka
4
4
  class Admin
5
+ # Handle for describe ACL operation
5
6
  class DescribeAclHandle < AbstractHandle
6
7
  layout :pending, :bool,
7
- :response, :int,
8
- :response_string, :pointer,
9
- :acls, :pointer,
10
- :acls_count, :int
8
+ :response, :int,
9
+ :response_string, :pointer,
10
+ :acls, :pointer,
11
+ :acls_count, :int
11
12
 
12
13
  # @return [String] the name of the operation.
13
14
  def operation_name
@@ -19,10 +20,12 @@ module Rdkafka
19
20
  DescribeAclReport.new(acls: self[:acls], acls_count: self[:acls_count])
20
21
  end
21
22
 
23
+ # Raises an error if the operation failed
24
+ # @raise [RdkafkaError]
22
25
  def raise_error
23
26
  raise RdkafkaError.new(
24
- self[:response],
25
- broker_message: self[:response_string].read_string
27
+ self[:response],
28
+ broker_message: self[:response_string].read_string
26
29
  )
27
30
  end
28
31
  end
@@ -2,17 +2,19 @@
2
2
 
3
3
  module Rdkafka
4
4
  class Admin
5
+ # Report for describe ACL operation result
5
6
  class DescribeAclReport
6
-
7
7
  # acls that exists in the cluster for the resource_type, resource_name and pattern_type filters provided in the request.
8
8
  # @return [Rdkafka::Bindings::AclBindingResult] array of matching acls.
9
9
  attr_reader :acls
10
10
 
11
+ # @param acls [FFI::Pointer] pointer to ACLs array
12
+ # @param acls_count [Integer] number of ACLs
11
13
  def initialize(acls:, acls_count:)
12
- @acls=[]
14
+ @acls = []
13
15
 
14
16
  if acls != FFI::Pointer::NULL
15
- acl_binding_result_pointers = acls.read_array_of_pointer(acls_count)
17
+ acl_binding_result_pointers = acls.read_array_of_pointer(acls_count)
16
18
  (1..acls_count).map do |acl_index|
17
19
  acl_binding_result = AclBindingResult.new(acl_binding_result_pointers[acl_index - 1])
18
20
  @acls << acl_binding_result
@@ -2,12 +2,13 @@
2
2
 
3
3
  module Rdkafka
4
4
  class Admin
5
+ # Handle for describe configs operation
5
6
  class DescribeConfigsHandle < AbstractHandle
6
7
  layout :pending, :bool,
7
- :response, :int,
8
- :response_string, :pointer,
9
- :config_entries, :pointer,
10
- :entry_count, :int
8
+ :response, :int,
9
+ :response_string, :pointer,
10
+ :config_entries, :pointer,
11
+ :entry_count, :int
11
12
 
12
13
  # @return [String] the name of the operation.
13
14
  def operation_name
@@ -22,6 +23,8 @@ module Rdkafka
22
23
  )
23
24
  end
24
25
 
26
+ # Raises an error if the operation failed
27
+ # @raise [RdkafkaError]
25
28
  def raise_error
26
29
  raise RdkafkaError.new(
27
30
  self[:response],
@@ -2,11 +2,14 @@
2
2
 
3
3
  module Rdkafka
4
4
  class Admin
5
+ # Report for describe configs operation result
5
6
  class DescribeConfigsReport
6
7
  attr_reader :resources
7
8
 
9
+ # @param config_entries [FFI::Pointer] pointer to config entries array
10
+ # @param entry_count [Integer] number of config entries
8
11
  def initialize(config_entries:, entry_count:)
9
- @resources=[]
12
+ @resources = []
10
13
 
11
14
  return if config_entries == FFI::Pointer::NULL
12
15
 
@@ -37,6 +40,9 @@ module Rdkafka
37
40
 
38
41
  private
39
42
 
43
+ # Validates the config resource result and raises an error if invalid
44
+ # @param config_resource_result_ptr [FFI::Pointer] pointer to the config resource result
45
+ # @raise [RdkafkaError] when the config resource has an error
40
46
  def validate!(config_resource_result_ptr)
41
47
  code = Bindings.rd_kafka_ConfigResource_error(config_resource_result_ptr)
42
48
 
@@ -2,12 +2,13 @@
2
2
 
3
3
  module Rdkafka
4
4
  class Admin
5
+ # Handle for incremental alter configs operation
5
6
  class IncrementalAlterConfigsHandle < AbstractHandle
6
7
  layout :pending, :bool,
7
- :response, :int,
8
- :response_string, :pointer,
9
- :config_entries, :pointer,
10
- :entry_count, :int
8
+ :response, :int,
9
+ :response_string, :pointer,
10
+ :config_entries, :pointer,
11
+ :entry_count, :int
11
12
 
12
13
  # @return [String] the name of the operation.
13
14
  def operation_name
@@ -22,6 +23,8 @@ module Rdkafka
22
23
  )
23
24
  end
24
25
 
26
+ # Raises an error if the operation failed
27
+ # @raise [RdkafkaError]
25
28
  def raise_error
26
29
  raise RdkafkaError.new(
27
30
  self[:response],
@@ -2,11 +2,14 @@
2
2
 
3
3
  module Rdkafka
4
4
  class Admin
5
+ # Report for incremental alter configs operation result
5
6
  class IncrementalAlterConfigsReport
6
7
  attr_reader :resources
7
8
 
9
+ # @param config_entries [FFI::Pointer] pointer to config entries array
10
+ # @param entry_count [Integer] number of config entries
8
11
  def initialize(config_entries:, entry_count:)
9
- @resources=[]
12
+ @resources = []
10
13
 
11
14
  return if config_entries == FFI::Pointer::NULL
12
15
 
@@ -37,6 +40,9 @@ module Rdkafka
37
40
 
38
41
  private
39
42
 
43
+ # Validates the config resource result and raises an error if invalid
44
+ # @param config_resource_result_ptr [FFI::Pointer] pointer to the config resource result
45
+ # @raise [RdkafkaError] when the config resource has an error
40
46
  def validate!(config_resource_result_ptr)
41
47
  code = Bindings.rd_kafka_ConfigResource_error(config_resource_result_ptr)
42
48