jruby-kafka 4.0.0-java → 4.1.1-java
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.
- checksums.yaml +8 -8
- data/lib/jruby-kafka/kafka-producer.rb +16 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzhhN2I5MDI0MzI3ZTE4ZGZiMWQ5ZTdhMWFkMDhlNTBhZjA5NTU1Yg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDIwYWRhMTdjYjJhZjM0MWU3MTU3MDk3NmJiMzJjZTEyMTIzNWZhNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTQ0NWJhMmFiNzdkZWMwNWJiYjFjMjI0NTFiMmFjZTA5NGU1MjlkMmI3NmU0
|
10
|
+
MzdjMDY1NjgzNDhjN2U5NWJmNDA1NDViMGM1YjgwN2FkMzY0MzUzYWFmMjJm
|
11
|
+
NTkzNzJiYzg1ZDllYjExYjYyMTJhMmQzM2ZiYmM5YzY1ODY1MDA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDIwNmJlYjM0NDg3MzUxNDI5NzNlMWI3MzllMDI1NmNkMGY3Y2RlMTkxYWVk
|
14
|
+
YTM3MjJiMzRkMTY5NzFlYmJhMzJiYzE4M2JmZWQ4YTg2Y2I3OWMxYzIxNmMx
|
15
|
+
NDAwNGU4NTQ1ZjJkNTM2Yzk3ZTUwYmNmYTVjMTE5YTZhM2FhZjA=
|
@@ -40,12 +40,24 @@ class Kafka::KafkaProducer < Java::org.apache.kafka.clients.producer.KafkaProdu
|
|
40
40
|
java_alias :send_method , :send, [ProducerRecord]
|
41
41
|
java_alias :send_cb_method, :send, [ProducerRecord, Callback.java_class]
|
42
42
|
|
43
|
-
#
|
44
|
-
|
43
|
+
# Send a message to the cluster.
|
44
|
+
#
|
45
|
+
# @param [String] topic The topic to send the message to.
|
46
|
+
# @param [Integer,nil] partition The topic partition to send the message to, or nil to allow
|
47
|
+
# the configured partitioner class to select the partition.
|
48
|
+
# @param [String,nil] key The message key, if there is one. Otherwise, nil.
|
49
|
+
# @param [String] value The message value.
|
50
|
+
# @param [Integer,nil] timestamp The message timestamp in milliseconds. If nil, the
|
51
|
+
# producer will assign it the current time.
|
52
|
+
#
|
53
|
+
# @raise [FailedToSendMessageException] if it can't send the message
|
54
|
+
def send_msg(topic, partition, key, value, timestamp=nil, &block)
|
55
|
+
record = ProducerRecord.new(topic, partition, timestamp, key, value)
|
56
|
+
|
45
57
|
if block
|
46
|
-
send_cb_method
|
58
|
+
send_cb_method record, RubyCallback.new(block)
|
47
59
|
else
|
48
|
-
send_method
|
60
|
+
send_method record
|
49
61
|
end
|
50
62
|
end
|
51
63
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jruby-kafka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.1.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Joseph Lawson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|