kafka_rest 0.1.0 → 0.1.1

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,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d5e671a973f14b00032c1179221bb5b601f69e74
4
- data.tar.gz: f862965c6fe2abcbc74fb6f854842c457046b484
3
+ metadata.gz: 5838cebb0452e8d735cd3909d0b4ff0369267650
4
+ data.tar.gz: 1cbb28c110e2740222a16b43a35661984408856c
5
5
  SHA512:
6
- metadata.gz: 10586878e19b68a9213dd3fb27005213120153d0b8a83f7752ecf6e68a629c922c4bf340d43011fdc98b70de5223847a1b6cbd9e7d4e8c61a0b5b19dd80c786b
7
- data.tar.gz: bb163d15b9c8971fde3d29a0f5d7bfe0087a148bf2373aec67c2b8b0b50a23a95be4e655761566fde3b33c1ec9701b96f94c8924019d95489d8ff8f1d6e76ce3
6
+ metadata.gz: 36d4570abfdbd64e881705bf7adf5a639bc4bbd9463499b7cd54adf5856eabab4a7796f9236220809ad9ce637c2cf6db6ccd02de9c1135c9e8fb9fe89696fae3
7
+ data.tar.gz: 925c464004a994b21ca22752e7b519dadd3728a0cb579637f2f7438d9a1e3c9c6f85146cd156da0683f5cca4904869a1bf1e0e657fe1942942aafd0c22ca4396
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Build Status](https://travis-ci.org/jjlangholtz/kafka_rest.svg?branch=master)](https://travis-ci.org/jjlangholtz/kafka_rest)
2
+
1
3
  # KafkaRest
2
4
 
3
5
  A ruby wrapper for Kakfa Rest Proxy.
@@ -65,6 +67,12 @@ partition.produce(message)
65
67
 
66
68
  # You can even produce messages asynchronously
67
69
  partition.produce_async(message)
70
+
71
+ # To produce Avro encoded messages, parse a schema definition and pass to topic
72
+ schema = KafkaRest::Schema.parse('Foo.avsc')
73
+ topic = KafkaRest.topic('Foo', schema)
74
+
75
+ topic.produce(value: message)
68
76
  ```
69
77
 
70
78
  #### Consuming
@@ -38,10 +38,12 @@ module KafkaRest
38
38
  def produce(*messages)
39
39
  payload = { records: format(messages) }
40
40
 
41
- if schema && schema.id
42
- payload[:value_schema_id] = schema.id
43
- else
44
- payload[:value_schema] = schema.serialized
41
+ if schema
42
+ if schema.id
43
+ payload[:value_schema_id] = schema.id
44
+ else
45
+ payload[:value_schema] = schema.serialized
46
+ end
45
47
  end
46
48
 
47
49
  res = client.post(topic_path, payload, schema, true)
@@ -1,3 +1,3 @@
1
1
  module KafkaRest
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kafka_rest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Langholtz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-18 00:00:00.000000000 Z
11
+ date: 2016-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -152,3 +152,4 @@ signing_key:
152
152
  specification_version: 4
153
153
  summary: Ruby wrapper for the Kafka REST Proxy
154
154
  test_files: []
155
+ has_rdoc: