jruby-kafka 0.1.3-java → 0.2.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jruby-kafka/producer.rb +6 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25c550cc97c9b34ca77bd8b4b6e7db5fa18a6835
|
4
|
+
data.tar.gz: c20ccd7aab41df5a3738239b4beaba87db81df29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 375d163f4a8a12828c83911c7763a24e70c7e3e4e1ceaa0eb1882543f18b3a1a370b27fcd24ab818484cd1c2f335d7d4da5c69e9eddd0634187bb04a24ce3055
|
7
|
+
data.tar.gz: 4533509f03e2f893e472cf9026d284a08e3e5999be1f6fb6ddfbc078deb58e5e31fc90b71145150ec59478b478e98edb844467c42ac6756a742c7a723feaf755
|
data/lib/jruby-kafka/producer.rb
CHANGED
@@ -59,7 +59,7 @@ class Kafka::Producer
|
|
59
59
|
@send_method = proc { throw StandardError.new "Producer is not connected" }
|
60
60
|
end
|
61
61
|
|
62
|
-
def connect
|
62
|
+
def connect
|
63
63
|
@producer = KafkaProducer.new(createProducerConfig)
|
64
64
|
@send_method = producer.java_method :send, [KeyedMessage]
|
65
65
|
end
|
@@ -69,6 +69,10 @@ class Kafka::Producer
|
|
69
69
|
send_method.call(KeyedMessage.new(topic, key, msg))
|
70
70
|
end
|
71
71
|
|
72
|
+
def close
|
73
|
+
@producer.close
|
74
|
+
end
|
75
|
+
|
72
76
|
private
|
73
77
|
|
74
78
|
def validate_arguments
|
@@ -83,7 +87,7 @@ class Kafka::Producer
|
|
83
87
|
end
|
84
88
|
end
|
85
89
|
|
86
|
-
def createProducerConfig
|
90
|
+
def createProducerConfig
|
87
91
|
properties = java.util.Properties.new()
|
88
92
|
options.each { |opt, value| properties.put opt, value.to_s }
|
89
93
|
return ProducerConfig.new(properties)
|
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: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Joseph Lawson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jbundler
|
@@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: '0'
|
60
60
|
requirements:
|
61
|
-
- jar 'org.apache.kafka:kafka_2.9.2', '0.8.1'
|
61
|
+
- jar 'org.apache.kafka:kafka_2.9.2', '0.8.1.1'
|
62
62
|
- jar 'log4j:log4j', '1.2.14'
|
63
63
|
rubyforge_project:
|
64
64
|
rubygems_version: 2.2.2
|