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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NTg4NDUwZGJjMDQyNGNjOWE2NTVkYThmMTA4NDAxZjUwMzUyNTJlMw==
4
+ MzhhN2I5MDI0MzI3ZTE4ZGZiMWQ5ZTdhMWFkMDhlNTBhZjA5NTU1Yg==
5
5
  data.tar.gz: !binary |-
6
- MzI0NjI2MTM5MDg2ZDM1MWVlOTY0NzkxNGMzODQ5N2E5MTgxNzExOQ==
6
+ ZDIwYWRhMTdjYjJhZjM0MWU3MTU3MDk3NmJiMzJjZTEyMTIzNWZhNg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ODEyYzI0OTkxN2IwYmM1NWE0Mzk0NDliNjFkNzViYjMwMjIxZGI5ODQzZDcy
10
- MjJkZDczYzM1MmI0NGY0ZmNkNmMzOGE0YzE5YzY4ZjkyOGVhNWQ5NDFjZGE1
11
- NmRmODljMDkzMWUyMzg4NGY4ZjUxM2Y3ODZkODdhN2M3ODcxZWY=
9
+ MTQ0NWJhMmFiNzdkZWMwNWJiYjFjMjI0NTFiMmFjZTA5NGU1MjlkMmI3NmU0
10
+ MzdjMDY1NjgzNDhjN2U5NWJmNDA1NDViMGM1YjgwN2FkMzY0MzUzYWFmMjJm
11
+ NTkzNzJiYzg1ZDllYjExYjYyMTJhMmQzM2ZiYmM5YzY1ODY1MDA=
12
12
  data.tar.gz: !binary |-
13
- Mzg2YTgzMmJhZWExMzAzYjA0MTIwOTYwZjE2OWM5MzliZmRkYWM1MmYxZGYx
14
- MzE2YWUyN2UwZjcwMDc1YzEwOWI3NzA2NDY3NDZmNzM0ZDJjYWViMmQyODc5
15
- NDVjNWFkYTEyZjJiNTM4NDU1YTk1NDIwMDY3YzIzZThlNmVkMGM=
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
- # throws FailedToSendMessageException or if not connected, StandardError.
44
- def send_msg(topic, partition, key, value, &block)
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 ProducerRecord.new(topic, partition, key, value), RubyCallback.new(block)
58
+ send_cb_method record, RubyCallback.new(block)
47
59
  else
48
- send_method ProducerRecord.new(topic, partition, key, value)
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.0.0
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-17 00:00:00.000000000 Z
11
+ date: 2016-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby