Skip to content

Commit

Permalink
Merge branch 'apache:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
graysonzeng authored Jul 18, 2023
2 parents e4965ac + 3812c07 commit e193c86
Show file tree
Hide file tree
Showing 15 changed files with 440 additions and 145 deletions.
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,43 @@

All notable changes to this project will be documented in this file.

[0.11.0] 2023-07-04

## Features
* Support the schema type ProtoNativeSchema by @gaoran10 in https://github.com/apache/pulsar-client-go/pull/1006
* Implement transactional consumer/producer API by @liangyepianzhou in https://github.com/apache/pulsar-client-go/pull/1002
* Support NonDurable subscriptions by @dinghram in https://github.com/apache/pulsar-client-go/pull/992
* Allow user to specify TLS ciphers an min/max TLS version by @dinghram in https://github.com/apache/pulsar-client-go/pull/1041
* Add single partition router by @crossoverJie in https://github.com/apache/pulsar-client-go/pull/999

## Improve
* Fix missing link in the release process by @RobertIndie in https://github.com/apache/pulsar-client-go/pull/1000
* Stablize golangci-lint task in CI by @tisonkun in https://github.com/apache/pulsar-client-go/pull/1007
* Fix reconnection backoff logic by @wolfstudy in https://github.com/apache/pulsar-client-go/pull/1008
* Change token name to `GITHUB_TOKEN` in CI by @labuladong in https://github.com/apache/pulsar-client-go/pull/910
* Add links to client docs and feature matrix in README.md by @momo-jun in https://github.com/apache/pulsar-client-go/pull/1014
* Fix flaky test `TestMaxPendingChunkMessages` by @Gleiphir2769 in https://github.com/apache/pulsar-client-go/pull/1003
* Fix flaky test in `negative_acks_tracker_test.go` by @RobertIndie in https://github.com/apache/pulsar-client-go/pull/1017
* Fix event time not being set when batching is disabled by @RobertIndie in https://github.com/apache/pulsar-client-go/pull/1015
* Use maphash instead of crypto/sha256 for hash function of hashmap in Schema.hash() by @bpereto in https://github.com/apache/pulsar-client-go/pull/1022
* Improve logs on failTimeoutMessages by @tisonkun in https://github.com/apache/pulsar-client-go/pull/1025
* Delete LICENSE-go-rate.txt by @tisonkun in https://github.com/apache/pulsar-client-go/pull/1028
* Fix broken master by upgrading JRE to 17 by @BewareMyPower in https://github.com/apache/pulsar-client-go/pull/1030
* Split sendRequest and make reconnectToBroker and other operation in the same coroutine by @zengguan in https://github.com/apache/pulsar-client-go/pull/1029
* Install openjdk-17 in Dockerfile by @crossoverJie in https://github.com/apache/pulsar-client-go/pull/1037
* Fix ordering key not being set and parsed when batching is disabled by @RobertIndie in https://github.com/apache/pulsar-client-go/pull/1034
* Check if callback is nil before calling it by @gunli in https://github.com/apache/pulsar-client-go/pull/1036
* Refactor duplicated code lines and fix typo errors by @gunli in https://github.com/apache/pulsar-client-go/pull/1039

## New Contributors
* @gaoran10 made their first contribution in https://github.com/apache/pulsar-client-go/pull/1006
* @momo-jun made their first contribution in https://github.com/apache/pulsar-client-go/pull/1014
* @bpereto made their first contribution in https://github.com/apache/pulsar-client-go/pull/1022
* @zengguan made their first contribution in https://github.com/apache/pulsar-client-go/pull/1029
* @gunli made their first contribution in https://github.com/apache/pulsar-client-go/pull/1036

**Full Changelog**: https://github.com/apache/pulsar-client-go/compare/v0.10.0...v0.11.0-candidate-1

[0.10.0] 2023-03-27

## Feature
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ARG GOLANG_IMAGE=golang:latest
FROM $PULSAR_IMAGE as pulsar
FROM $GOLANG_IMAGE

RUN apt-get update && apt-get install -y openjdk-17-jre-headless ca-certificates
RUN apt-get update && apt-get install -y openjdk-17-jre ca-certificates

COPY --from=pulsar /pulsar /pulsar

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// This version number refers to the currently released version number
// Please fix the version when release.
v0.10.0
v0.11.0
2 changes: 1 addition & 1 deletion docs/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ https://dist.apache.org/repos/dist/dev/pulsar/pulsar-client-go-0.X.0-candidate-1
The tag to be voted upon:
v0.X.0
https://github.com/apache/pulsar-client-node/releases/tag/v0.X.0
https://github.com/apache/pulsar-client-go/tree/v0.X.0-candidate-1
SHA-512 checksums:
97bb1000f70011e9a585186590e0688586590e09 apache-pulsar-client-go-0.X.0-src.tar.gz
Expand Down
9 changes: 9 additions & 0 deletions pulsar/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,15 @@ type ClientOptions struct {
// Configure whether the Pulsar client verify the validity of the host name from broker (default: false)
TLSValidateHostname bool

// TLSCipherSuites is a list of enabled TLS 1.0–1.2 cipher suites. See tls.Config CipherSuites for more information.
TLSCipherSuites []uint16

// TLSMinVersion contains the minimum TLS version that is acceptable. See tls.Config MinVersion for more information.
TLSMinVersion uint16

// TLSMaxVersion contains the maximum TLS version that is acceptable. See tls.Config MaxVersion for more information.
TLSMaxVersion uint16

// Configure the net model for vpc user to connect the pulsar broker
ListenerName string

Expand Down
3 changes: 3 additions & 0 deletions pulsar/client_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ func newClient(options ClientOptions) (Client, error) {
TrustCertsFilePath: options.TLSTrustCertsFilePath,
ValidateHostname: options.TLSValidateHostname,
ServerName: url.Hostname(),
CipherSuites: options.TLSCipherSuites,
MinVersion: options.TLSMinVersion,
MaxVersion: options.TLSMaxVersion,
}
default:
return nil, newError(InvalidConfiguration, fmt.Sprintf("Invalid URL scheme '%s'", url.Scheme))
Expand Down
1 change: 1 addition & 0 deletions pulsar/consumer_partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -1190,6 +1190,7 @@ func (pc *partitionConsumer) MessageReceived(response *pb.CommandMessage, header
redeliveryCount: response.GetRedeliveryCount(),
schemaVersion: msgMeta.GetSchemaVersion(),
schemaInfoCache: pc.schemaInfoCache,
orderingKey: string(msgMeta.GetOrderingKey()),
index: messageIndex,
brokerPublishTime: brokerPublishTime,
}
Expand Down
6 changes: 6 additions & 0 deletions pulsar/internal/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ type TLSOptions struct {
AllowInsecureConnection bool
ValidateHostname bool
ServerName string
CipherSuites []uint16
MinVersion uint16
MaxVersion uint16
}

var (
Expand Down Expand Up @@ -1046,6 +1049,9 @@ func (c *connection) closed() bool {
func (c *connection) getTLSConfig() (*tls.Config, error) {
tlsConfig := &tls.Config{
InsecureSkipVerify: c.tlsOptions.AllowInsecureConnection,
CipherSuites: c.tlsOptions.CipherSuites,
MinVersion: c.tlsOptions.MinVersion,
MaxVersion: c.tlsOptions.MaxVersion,
}

if c.tlsOptions.TrustCertsFilePath != "" {
Expand Down
3 changes: 3 additions & 0 deletions pulsar/internal/http_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ func getDefaultTransport(tlsConfig *TLSOptions) (http.RoundTripper, error) {
if tlsConfig != nil {
cfg := &tls.Config{
InsecureSkipVerify: tlsConfig.AllowInsecureConnection,
CipherSuites: tlsConfig.CipherSuites,
MinVersion: tlsConfig.MinVersion,
MaxVersion: tlsConfig.MaxVersion,
}
if len(tlsConfig.TrustCertsFilePath) > 0 {
rootCA, err := os.ReadFile(tlsConfig.TrustCertsFilePath)
Expand Down
Loading

0 comments on commit e193c86

Please sign in to comment.