查看原文
其他

Go Client 0.1.1 版本发布

冉小龙 ApachePulsar 2021-10-18

pulsar-client-go(https://github.com/apache/pulsar-client-go) 是一个使用 Go 语言编写的 Go Client 库,旨在替换原来的 CGO client,从而更好地支持 Pulsar 在 Go 社区的应用和集成 。


继 Go CLient 0.1.0 发布以来,Go Client 因其强大的易用性得到广泛用户的青睐。同时,也吸引越来越多的用户进一步丰富 Go Client 特性并修复其中的一些 Bug。


本文主要介绍 Go client 0.1.1 版本中的 Bug 修复。







修复改进


  • 修复 batching flag 逻辑,避免当 `deliverAt` 参数初始化时,`deliverAt.UnixNano()` 返回值不为 0 的情况发生。[PR-209]

  • 修复访问分区 producer 状态时出现的竞态条件。[PR-215]

  • 修复 TLS 连接问题问题。之前,在开启 TLS 功能之后,当 Go Client 执行 ookup 的操作之后,使用的仍然是 BrokerServiceUrl 的连接请求。现在将请求的 URL 从 `BrokerServiceURL`修改为 `BrokerServiceUrlTls`,修复 TLS 连接问题。[PR-220]

  • 支持设置 `disableForceTopicCreation` 参数。缺省情况下,`disableForceTopicCreation` 的值为 `false`,即禁用 force topic creation 功能。[PR-226]

  • `pulsar/internal/auth` 中添加 Athenz 认证机制,使 Go client 支持 Athenz 认证机制。[PR-227]

  • 修复 `producer Flush()` 操作中出现的竞态条件。[PR-229]

  • 删除 `sync Send()` 操作中不必要的 `Flush()` 函数。如需发送信息,可以调用 `internalSendAsync()` 和 `flushImmediately=true` 函数立即发送消息。[PR-230]

  • 支持在 non-batching 模式下,允许消息体携带空 payload。[PR-236]

  • 增加 `connectionReader readAtLeast` 错误信息的解释说明。[PR-237]

  • 修复 `zstdProvider` 的 ZSTD 内存泄露问题。之前,`zstdProvider.Decompress` 无法关闭 ZSTD 解码器,从而导致内存泄露。现在,可以使用 `decoder.DecodeAll` 来实现 `zstdProvider.Decompress` 并重用 ZSTD 解码器。[PR-245]

  • 增加 `IsReplicated``GetReplicatedFrom` 参数。`IsReplicated` 用于确定消息是否从其他集群中复制过来。`GetReplicatedFrom` 用于获取集群名称。[PR-251]

  • 进一步解释 `SendAsync` 函数。当 `event channel` 满了或者 `maxPendingMessages` 达到最大值,`SendAsync` 函数将会阻塞。[PR-254]

  • 解决无法关闭 perf-producer 的问题。[PR-255]

  • 将 perf-producer 的 quantile target 从 0.90 更改为 0.50,修复 perf-producer target 问题。[PR-256]

  • 修复无法添加 `batchbuilder` 的问题。当无法添加 `batchbuilder` 时,应调用并释放 `publishSemaphore` 函数。[PR-260]

  • 修复当 `DisableBatching` 设置为 `true` 时,日志文件中充满大量 debug 信息的问题。[PR-261]

  • 增加 `maxMessageSize` 参数,用于检查消息的净荷大小是否超过 `maxMessageSize`。如果超过,停止发送消息并返回错误信息。[PR-263]

  • 验证多个 Go Client 版本,包括 Go Client 1.11、 1.12、 1.13、 1.14,确保其兼容性。[PR-269]

  • 支持当应用程序已经开启 CGO,支持使用 native ZSTD 库,以便获得更好的性能。[PR-270]

  • 支持在关闭 Producer 时,关闭分区发现功能。[PR-272]

  • 支持使用微基准测试来报告压缩和解压缩速率。[PR-275]

  • 允许每个 Broker 建立多个TCP连接,从而增加 Go Client 的并行度,提升吞吐量。[PR-276]

  • `writeRequestsCh` channel 的缓存大小从 10 增加到 256 ,避免在多分区操作时,在单个连接中可能会引起争用或阻塞的问题。[PR-277]







贡献者


感谢以下社区人员为 Go Client 0.1.1 版本的正式发布做出卓越贡献:

  • yarthur1
    (https://github.com/yarthur1)

  • vergnes
    (https://github.com/vergnes)

  • sijie
    (https://github.com/sijie)

  • shustsud
    (https://github.com/shustsud)

  • rueian
    (https://github.com/rueian)

  • mileschao
    (https://github.com/mileschao)

  • keithnull
    (https://github.com/keithnull)

  • abatilo
    (https://github.com/abatilo)

  • cornelk
    (https://github.com/cornelk)

  • equanz
    (https://github.com/equanz)

  • jerrypeng
    (https://github.com/jerrypeng)

  • jonyhy96
    (https://github.com/jonyhy96)



更多关于 Go Client 相关内容可以查看:Go Client 0.1.0 版本正式发布 

: . Video Mini Program Like ,轻点两下取消赞 Wow ,轻点两下取消在看

您可能也对以下帖子感兴趣

文章有问题?点此查看未经处理的缓存