lib/racecar/consumer.rb in racecar-2.5.0 vs lib/racecar/consumer.rb in racecar-2.6.0
- old
+ new
@@ -91,17 +91,18 @@
end
protected
# https://github.com/appsignal/rdkafka-ruby#producing-messages
- def produce(payload, topic:, key: nil, partition_key: nil, headers: nil, create_time: nil)
+ def produce(payload, topic:, key: nil, partition: nil, partition_key: nil, headers: nil, create_time: nil)
@delivery_handles ||= []
message_size = payload.respond_to?(:bytesize) ? payload.bytesize : 0
instrumentation_payload = {
value: payload,
headers: headers,
key: key,
+ partition: partition,
partition_key: partition_key,
topic: topic,
message_size: message_size,
create_time: Time.now,
buffer_size: @delivery_handles.size,
@@ -110,9 +111,10 @@
@instrumenter.instrument("produce_message", instrumentation_payload) do
@delivery_handles << @producer.produce(
topic: topic,
payload: payload,
key: key,
+ partition: partition,
partition_key: partition_key,
timestamp: create_time,
headers: headers,
)
end