Skip to content

Commit

Permalink
Merge pull request #120 from kafkajs/release-3.0.0
Browse files Browse the repository at this point in the history
Release 3.0.0
  • Loading branch information
Nevon authored May 20, 2021
2 parents f9bd3ed + e9ae310 commit 8efbdd6
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,33 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [3.0.0] - 2021-05-20

This version is non-breaking for the overwhelming majority of users.

When creating an instance of SchemaRegistry for Protobuf without the [`messageName`
parameter](https://kafkajs.github.io/confluent-schema-registry/docs/usage#protobuf-1)
confluent-schema-registry would, under certain circumstances, default
to the wrong message type in the schema. Specifically, instead of defaulting to
the first message type in the schema it would erroneously default to the first
message type that did not define a nested type.

**If you were relying on this behavior may need to either**:

* Start passing [the `messageName` parameter](https://kafkajs.github.io/confluent-schema-registry/docs/usage#protobuf-1) instead of relying on the default behavior
* Update your schemas and re-ingest messages accordingly

See issue [#112](https://github.com/kafkajs/confluent-schema-registry/issues/112) for
more info

### Added

- Allow setting HTTP agent [#108](https://github.com/kafkajs/confluent-schema-registry/pull/108)

### Fixed

- Fix default nested Protobuf type [#113](https://github.com/kafkajs/confluent-schema-registry/pull/113)

## [2.0.1] - 2021-04-02

- Fix export of SchemaType [#100](https://github.com/kafkajs/confluent-schema-registry/pull/100)
Expand Down
15 changes: 15 additions & 0 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,21 @@ const registry = new SchemaRegistry({
})
```

### HTTP Agent

Configuring the behavior of the HTTP requests towards the schema registry API
can be done by passing in an instance of an [Agent](https://nodejs.org/api/https.html#https_class_https_agent).

```ts
import { Agent } from 'http'

const agent = new Agent({ keepAlive: true })
const registry = new SchemaRegistry({
host: 'http://localhost:8081',
agent
})
```

### Schema type options

The second argument to the `SchemaRegistry` constructor is an object with keys for each `SchemaType`.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kafkajs/confluent-schema-registry",
"version": "2.0.1",
"version": "3.0.0",
"main": "dist/index.js",
"description": "ConfluentSchemaRegistry is a library that makes it easier to interact with the Confluent schema registry, it provides convenient methods to encode, decode and register new schemas using the Apache Avro serialization format.",
"keywords": [
Expand Down

0 comments on commit 8efbdd6

Please sign in to comment.