Skip to content

Commit

Permalink
Merge pull request #880 from Shopify/kafka-2.7.0
Browse files Browse the repository at this point in the history
kafka 2.7.0
  • Loading branch information
dasch authored Jan 14, 2021
2 parents 49c6194 + 9028ed7 commit 0d6c451
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 6 deletions.
34 changes: 34 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,39 @@ jobs:
- run: bundle install --path vendor/bundle
- run: bundle exec rspec --profile --tag functional spec/functional

kafka-2.7:
docker:
- image: circleci/ruby:2.5.1-node
environment:
LOG_LEVEL: DEBUG
- image: wurstmeister/zookeeper
- image: wurstmeister/kafka:2.13-2.7.0
environment:
KAFKA_ADVERTISED_HOST_NAME: localhost
KAFKA_ADVERTISED_PORT: 9092
KAFKA_PORT: 9092
KAFKA_ZOOKEEPER_CONNECT: localhost:2181
KAFKA_DELETE_TOPIC_ENABLE: true
- image: wurstmeister/kafka:2.13-2.7.0
environment:
KAFKA_ADVERTISED_HOST_NAME: localhost
KAFKA_ADVERTISED_PORT: 9093
KAFKA_PORT: 9093
KAFKA_ZOOKEEPER_CONNECT: localhost:2181
KAFKA_DELETE_TOPIC_ENABLE: true
- image: wurstmeister/kafka:2.13-2.7.0
environment:
KAFKA_ADVERTISED_HOST_NAME: localhost
KAFKA_ADVERTISED_PORT: 9094
KAFKA_PORT: 9094
KAFKA_ZOOKEEPER_CONNECT: localhost:2181
KAFKA_DELETE_TOPIC_ENABLE: true
steps:
- checkout
- run: sudo apt-get update && sudo apt-get install -y cmake # For installing snappy
- run: bundle install --path vendor/bundle
- run: bundle exec rspec --profile --tag functional spec/functional

workflows:
version: 2
test:
Expand All @@ -357,3 +390,4 @@ workflows:
- kafka-2.4
- kafka-2.5
- kafka-2.6
- kafka-2.7
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ Or install it yourself as:
<td>Limited support</td>
<td>Limited support</td>
</tr>
<tr>
<th>Kafka 2.7</th>
<td>Limited support</td>
<td>Limited support</td>
</tr>
</table>

This library is targeting Kafka 0.9 with the v0.4.x series and Kafka 0.10 with the v0.5.x series. There's limited support for Kafka 0.8, and things should work with Kafka 0.11, although there may be performance issues due to changes in the protocol.
Expand All @@ -150,6 +155,7 @@ This library is targeting Kafka 0.9 with the v0.4.x series and Kafka 0.10 with t
- **Kafka 2.4:** Everything that works with Kafka 2.3 should still work, but so far no features specific to Kafka 2.4 have been added.
- **Kafka 2.5:** Everything that works with Kafka 2.4 should still work, but so far no features specific to Kafka 2.5 have been added.
- **Kafka 2.6:** Everything that works with Kafka 2.5 should still work, but so far no features specific to Kafka 2.6 have been added.
- **Kafka 2.7:** Everything that works with Kafka 2.6 should still work, but so far no features specific to Kafka 2.7 have been added.

This library requires Ruby 2.1 or higher.

Expand Down
12 changes: 6 additions & 6 deletions spec/functional/topic_management_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,10 @@ def with_retry(opts = {}, &block)

topic = generate_topic_name
kafka.create_topic(topic, num_partitions: 3)
configs = kafka.describe_topic(topic, %w(retention.ms retention.bytes non_exists))
configs = kafka.describe_topic(topic, %w(retention.ms))

expect(configs.keys).to eql(%w(retention.ms retention.bytes))
expect(configs.keys).to eql(%w(retention.ms))
expect(configs['retention.ms']).to be_a(String)
expect(configs['retention.bytes']).to be_a(String)
end

example "alter a topic configuration" do
Expand All @@ -90,8 +89,9 @@ def with_retry(opts = {}, &block)
'max.message.bytes' => '987654'
)

configs = kafka.describe_topic(topic, %w(retention.ms max.message.bytes))
expect(configs['retention.ms']).to eql('1234567')
expect(configs['max.message.bytes']).to eql('987654')
retention_configs = kafka.describe_topic(topic, %w(retention.ms))
expect(retention_configs['retention.ms']).to eql('1234567')
max_msg_bytes_configs = kafka.describe_topic(topic, %w(max.message.bytes))
expect(max_msg_bytes_configs['max.message.bytes']).to eql('987654')
end
end

0 comments on commit 0d6c451

Please sign in to comment.