Releases: apache/pulsar-client-go
Releases · apache/pulsar-client-go
v0.18.0
What's Changed
- [improve] Modify the negativeACK structure to reduce memory overhead (#1410) by @gy-deng
- [feat] Use -1 as sentinel value for namespace and topic admin commands (#1430) by @klevy-toast
- [fix] Update namespace & topic admin methods to return nil if unset (#1433) by @klevy-toast
- [test] Add unit test for unloading topic before consuming zero queue messages (#1434) by @crossoverJie
- [feat] Add timestamp to schema info (#1436) by @freeznet
- [fix] Fix the issue of unable to parse non-batch messages that with non-empty properties and empty payloads (#1435) by @coderzc
- [chore] Bump
github.com/dvsekhvalnov/jose2gofrom 1.6.0 to 1.7.0 (#1439) by @dependabot[bot] - [fix] Fix partition update failure causing existing producers to close (#1437) by @RobertIndie
- [feat] Support reloading OAuth2 key file (#1441) by @RobertIndie
- [chore] Bump
golang.org/x/cryptofrom 0.36.0 to 0.45.0 (#1440) by @dependabot[bot] - [fix] Return error when the client transaction coordinator is nil to p… (#1444) by @thomas-bousquet
- [fix] Enhance zero queue consumer reconnection handling and message permit management (#1443) by @crossoverJie
New Contributors
v0.17.0
What's Changed
- [feat] Add
eventTimesupport inreconsumeLaterWithCustomProperties()(#1400) by @YoungCoderboy - [fix] Replace panic with proper error handling in RPC client and lookup service (#1403) by @RobertIndie
- [fix] DLQ messages lost system properties when sent from
reconsumeLater()(#1392) by @geniusjoe - [fix] Handle reconnection logic for zero-queue consumer (#1404) by @crossoverJie
- [fix] Add
DLQPolicy.DeadLetterTopicProducerNameto preserve producer name in DLQ messages (#1417) by @thomas-bousquet - [fix] Fix missing topic in DLQ producer name when using
RetryEnableoption (#1412) by @geniusjoe - [fix]
SendAsyncnow respects context and can timeout during reconnection (#1422) by @RobertIndie - [fix] Improve zero-queue consumer support for partitioned topics (#1424) by @crossoverJie
- [fix] Properties not consistently set in pulsar-admin subscription responses (#1419) by @JamesMurkin
- [feat] Support
Snappycompression type (#1406) by @geniusjoe - [feat] Add
WithContext()admin client methods (#1425) by @thomas-bousquet - [feat] Add support for max topics per namespace (#1413) by @miton18
- [fix] Allow multiple callbacks with concurrent producer flushes (async publish) (#1409) by @thomas-bousquet
- [improve] Change
pulsar_client_sending_buffers_countmetric to client level (#1408) by @BewareMyPower - [chore] Upgrade
hamba/avroto v2.29.0 (#1414) by @nodece - [chore] Bump
github.com/go-viper/mapstructure/v2from 2.2.1 to 2.4.0 (#1415) by @dependabot[bot] - [chore] Bump
github.com/docker/dockerfrom 27.1.1+incompatible to 28.0.0+incompatible (#1405) by @dependabot[bot]
New Contributors
- @YoungCoderboy made their first contribution in #1400
- @JamesMurkin made their first contribution in #1419
v0.16.0
What's Changed
- [fix][sec] Bump golang.org/x/net to address CVE-2025-22870, requires go 1.23 by @lhotari in #1351
- [chore] Bump github.com/golang-jwt/jwt/v5 from 5.2.1 to 5.2.2 by @dependabot in #1349
- [chore] Bump github.com/containerd/containerd from 1.7.18 to 1.7.27 by @dependabot in #1348
- [fix] Use sha instead of tag for golangci/golangci-lint-action by @nodece in #1352
- [feat] Prefetch role tokens in the background in the Athenz auth plugin by @masahiro-sakamoto in #1355
- [feat] Make ZTS proxy configurable in athenz auth plugin by @masahiro-sakamoto in #1360
- [fix] Fix reader hanging when startMessageId is latest by @RobertIndie in #1364
- [fix] Fix CI can't be failed even the tests are failed by @RobertIndie in #1367
- [improve] Improve perf with level guard in slogWrapper calls by @gareth-murphy in #1374
- [feat] Support update or remove topic properties by @yunze-xu in #1381
- [test] Skip very flaky TestMessageSingleRouter for now by @yunze-xu in #1382
- [improve] Support ClientVersion in 2.x pulsar broker by @zhou-zhuohan in #1383
- [test] Add Testcase to test using keyShared subscription and delayed messages at the same time by @zhou-zhuohan in #1361
- [fix] Support json token file format authentication by @Qiang-Zhao in #1380
- [chore] Replace deprecated api rand.Seed by @Young-xu in #1363
- [fix] Fix namespace schema compatibility strategy by @Rui-Fu in #1386
- [fix] Fix backoff unit tests by @zhou-zhuohan in #1387
- [improve] Support http lookup getSchema interface by @zhou-zhuohan in #1368
- [fix] Fix the default nack backoff policy by @Gilthoniel in #1385
- [feat] Add pulsar admin namespace properties methods for PUT/GET/DELETE by @thomas-bousquet in #1390
- [fix] Fix sending buffer race by using proper reference counting by @RobertIndie in #1394
- [fix] ZeroQueueConsumer is not supported with RetryEnable by @crossoverJie in #1391
- [fix] Add missing metric tracking of
pulsar_client_consumer_acksfor AckIDList method by @RobertIndie in #1396 - [feat] Align topics level policies admin apis to java restful apis by @Rui-Fu in #1398
New Contributors
- @gmurphy-cogito made their first contribution in #1374
- @mattisonchao made their first contribution in #1380
- @xuthus5 made their first contribution in #1363
- @thomas-bousquet made their first contribution in #1390
v0.15.1
What's Changed
- [chore] Bump golang.org/x/net to address CVE-2025-22870, requires go 1.23 by @lhotari in #1351
- [chore] Bump github.com/golang-jwt/jwt/v5 from 5.2.1 to 5.2.2 by @dependabot in #1349
- [chore] Bump github.com/containerd/containerd from 1.7.18 to 1.7.27 by @dependabot in #1348
- [ci] Use sha instead of tag for golangci/golangci-lint-action by @nodece in #1352
- [fix] Fix reader hanging when startMessageId is latest by @RobertIndie in #1364
- [ci] Fix CI can't be failed even the tests are failed by @RobertIndie in #1367
v0.15.0
Important notice
- The client has dropped support for Go 1.21. The minimum supported version is now Go
1.22. (Related PR)
What's Changed
- [fix] Fix flaky test
TestCloseFlushWithTimerby @RobertIndie in #1292 - [feat] Add GetAllSchemas command by @calindima in #1289
- [improve] Include std tlsconfig in tlsoptions by @dream-kzx in #1293
- [fix] Decompress payload only if not empty by @stepanbujnak in #1280
- [chore] Bump hamba version to v2.26.0 by @hezhangjian in #1294
- [chore] Delete unused .header file by @hezhangjian in #1295
- [test] Use pulsar-client-go-test docker for
TestBlueGreenMigrationTestSuiteby @geniusjoe in #1287 - [improve] Use
chan *messageinstead ofchan []*messagefor queueCh by @nodece in #1283 - [fix] Compatible with HTTP header properties PIP-279 by @shibd in #1299
- [chore] Bump minimum Go version to 1.22 by @BewareMyPower in #1300
- [test] Upgrade pulsar image to 4.0.0 in tests by @crossoverJie in #1304
- [feat] PIP-368: Support lookup based on lookup properties by @crossoverJie in #1303
- [fix] Fix seek race by @nodece in #1265
- [feat] Support acknowledging a list of message IDs by @BewareMyPower in #1301
- [improve] Use ctx and timer instead of sleep by @nodece in #1256
- [chore] Remove unused fields and methods for internal connection by @BewareMyPower in #1306
- [improve] Improve AckIDList performance with many subscribed topics by @BewareMyPower in #1305
- [chore] Remove unnecessary code by @crossoverJie in #1307
- [improve] Admin GetStats: Fill missing fields by @crossoverJie in #1309
- [fix] Revert #1283 to fix possible deadlock when queueCh is full by @shibd in #1311
- [fix] Fix close blocked by @nodece in #1308
- [fix] Fix DLQ producer name conflicts with same name consumers by @geniusjoe in #1314
- [fix] Fix multiple consumers using zeroQueueConsumer by @crossoverJie in #1278
- [feat] PIP-254: Support configuring client version by @crossoverJie in #1316
- [fix] Enhance transaction functionality by @reugn in #1281
- [chore] Bump golang.org/x/crypto from 0.22.0 to 0.31.0 by @dependabot in #1318
- [fix] Wrap errors using %w to preserve context by @reugn in #1321
- [refactor] Use errors.Join to wrap multiple errors by @reugn in #1322
- [fix] Fix same producer/consumer using more than one connection per broker by @shibd in #1323
- [chore] Deprecated usages by @miton18 in #1329
- [chore] Upgrade lz4 to v4 by @RobertIndie in #1341
- [opt] Delete redundant channel connection.incomingCmdCh by @gunli in #1343
- [improve] Improve message decompress error handling by @RobertIndie in #1342
- [fix] Fix potential data/write conflicts by @gunli in #1336
- [chore] Update dependency versions by @reugn in #1327
- [fix] Fix wrong result of reader.hasNext/Next after seeking by id or time by @shibd in #1340
- [fix] Fix potential data race by @gunli in #1338
- [chore] Bump golang.org/x/net from 0.23.0 to 0.33.0 by @dependabot in #1334
- [improve] Update deliverAfter and deliverAt API comments by @geniusjoe in #1339
- [fix] Fix potential data race in pendingItem.done() by @gunli in #1347
New Contributors
- @calindima made their first contribution in #1289
- @stepanbujnak made their first contribution in #1280
- @miton18 made their first contribution in #1329
v0.14.0
Important notice
- The client has dropped support for Go 1.20. The minimum supported version is now Go
1.21. (Related PR) - The
BackoffPolicyinterface and related methods has been moved to thebackoffpackage from theinternalpackage.
TheBackoffPolicyinterface is renamed to
Policy. (Related PR)
What's Changed
- [improve] Install golang by image in the Dockerfile by @nodece in #1246
- [ci] Validate multiple version builds and use golangci-lint-action by @nodece in #1250
- [ci] Add merge limitation by @nodece in #1248
- [fix] Fix the key-based batch can't guarantee the ordering when flushing by @RobertIndie in #1252
- [fix] FailTimeoutMessages cannot delete outdated messages by @nodece in #1247
- [fix] Fix pulsar admin revoke subscription permission endpoint by @NoFacePeace in #1251
- [fix] Producer close was blocked by @nodece in #1249
- [fix] PulsarCtl 1266 Oauth2 Client credentials flow use scopes from the keyfile as well by @Nikolajls in #1244
- [feat] Add support for subscription expiration time namespace settings by @klevy-toast in #1254
- [fix] Prevent panic when calling Flush on closed producer by @Gilthoniel in #1260
- [fix] Avoid a data race when flushing with load by @Gilthoniel in #1261
- [improve] Add InitialSubscriptionName for DLQPolicy by @crossoverJie in #1264
- [fix] Peek message will return -1 for partitionIndex by @shibd in #1267
- [chore] Bump github.com/docker/docker from 27.0.3+incompatible to 27.1.1+incompatible by @dependabot in #1269
- [feat] Support the namespace offloadThresholdInSeconds API in pulsaradmin pkg by @ericsyh in #1271
- [fix] Stop timer when close timedAckGroupingTracker by @geniusjoe in #1279
- [improve] Refactor connection concurrency model by @Gilthoniel in #1275
- [fix] Attempt to avoid deadlock during reconnection by @Gilthoniel in #1273
- [fix] Fixed panic caused by memory not aligned in arm32 arch by @dream-kzx in #1286
- [fix] Reconnection logic and Backoff policy doesn't work correctly by @crossoverJie in #1197
New Contributors
- @NoFacePeace made their first contribution in #1251
- @Nikolajls made their first contribution in #1244
- @klevy-toast made their first contribution in #1254
- @ericsyh made their first contribution in #1271
- @dream-kzx made their first contribution in #1286
v0.13.1
- [fix] Avoid a data race when flushing with load by Gaylor Bosson in #1261
- [fix] Prevent panic when calling Flush on closed producer by Gaylor Bosson in #1260
- [fix] Producer close was blocked by Zixuan Liu in #1249
- [ci] Validate multiple version builds and use golangci-lint-action by Zixuan Liu in #1250
- [fix] Fix pulsar admin revoke subscription permission endpoint by 码斯克 in #1251
- [fix] failTimeoutMessages cannot delete outdated messages by Zixuan Liu in #1247
- [fix] Oauth2 Client credentials flow use scopes from the keyfile as well by Nikolaj Lund Sørensen in #1244
- [fix] Fix the key-based batch can't guarantee the ordering when flushing by Zike Yang in #1252
Full Changelog: v0.13.0...v0.13.1
v0.13.0
Important notice
- The avro schema codec has been changed from
github.com/linkedin/goavro/v2togithub.com/hamba/avro/v2. pulsar.NewSchemaDefinitionhas been removed. Usepulsar.NewAvroSchemainstead.- The client has dropped support for Go 1.18 and 1.19. The minimum supported version is now Go 1.20.
What's Changed
- [chore] bump golang.org/x/net from 0.0.0-20220225172249-27dd8689420f to 0.17.0 by @BewareMyPower in #1155
- [fix] Fix DLQ producer name conflicts when multiple consumers send messages to DLQ by @crossoverJie in #1156
- [improve] Add 0.12.0 change log by @RobertIndie in #1153
- [fix] Fix SIGSEGV with zstd compression enabled by @RobertIndie in #1164
- [improve] Respect context cancellation in Producer's Flush by @jayshrivastava in #1165
- [chore] Add CodeQL static code scanner by @merlimat in #1169
- [fix] Fix BytesSchema by @petermnhull in #1173
- [feat] Support partitioned topic reader by @RobertIndie in #1178
- [fix] Fix available permits in MessageReceived by @panszobe in #1181
- [fix] Make function state values
omitemptyby @freeznet in #1185 - [fix] Fix Infinite Loop in Reader's
HasNextFunction by @RobertIndie in #1182 - [improve] Add optional parameters for getPartitionedStats by @crossoverJie in #1193
- [chore] Remove
VERSIONandstable.txtfiles by @RobertIndie in #1158 - [improve] getMessagesById gets all messages by @crossoverJie in #1194
- [improve] Change base image to apachepulsar/pulsar by @crossoverJie in #1195
- [improve] Add change log for 0.12.1 by @RobertIndie in #1189
- [fix] Change the wrong
SourceInstanceStatusDatainSinkInstanceStatusby @jiangpengcheng in #1199 - [chore] bump google.golang.org/protobuf from 1.30.0 to 1.33.0 by @dependabot in #1198
- [improve] Add admin api HealthCheckWithTopicVersion by @crossoverJie in #1200
- [improve] Update topic admin interface comment, add topic admin test by @geniusjoe in #1202
- [fix] Build test container image using current hardware platform by @dragosvictor in #1205
- [improve] Expose RuntimeFlags for Pulsar Functions and Connectors by @freeznet in #1204
- [improve] Use physical address information in connection pool key by @dragosvictor in #1206
- [improve] Add a lint-docker command in makefile by @geniusjoe in #1207
- [improve] Add admin api GetLeaderBroker by @crossoverJie in #1203
- [chore] bump golang.org/x/net from 0.17.0 to 0.23.0 by @dependabot in #1209
- [improve] PIP-307: Use assigned broker URL hints during broker reconnection by @dragosvictor in #1208
- [improve] Add admin api GetListActiveBrokers by @crossoverJie in #1212
- [improve] Add admin api ForceDeleteSchema by @crossoverJie in #1213
- [improve] Upgrade golang-jwt to v5 by @nodece in #1214
- [improve] Supplement schema admin api by @crossoverJie in #1215
- [fix] Return an error when AckCumulative on a Shared/KeyShared subscription by @RobertIndie in #1217
- [cleanup] Remove AvroCodec from JSONSchema by @crossoverJie in #1216
- [fix] Reader Next returns on closed consumer by @Gilthoniel in #1219
- [improve] PIP-313 Support force unsubscribe using consumer api by @crossoverJie in #1220
- [improve] PIP-313 Add GetLastMessageIDs API by @crossoverJie in #1221
- [feat] PIP-188 Support blue-green migration by @heesung-sn in #1210
- [improve] Add admin topic api CreateWithProperties by @crossoverJie in #1226
- [fix] Fix dynamic config by @labuladong in #1228
- [feat] Support ZeroQueueConsumer by @crossoverJie in #1225
- [fix] Fix custom value with
/by @labuladong in #1229 - [improve] Reuse function checkMsgIDPartition by @crossoverJie in #1232
- [refactor] Replace linkedin/goavro/v2 with hamba/avro/v2 by @adrianiacobghiula in #1230
- [fix] Fix the issue where the AckIDCumulativ cannot return error by @crossoverJie in #1235
- [feat] Add a slog wrapper of the logger interface by @ivan-penchev in #1234
- [fix] Fix the client crash when the transaction coordinator not found by @RobertIndie in #1241
- [improve] Return
ErrMaxConcurrentOpsReachedwhen too many concurrent ops in transaction coordinator client by @RobertIndie in #1242 - [fix] Fix transaction coordinator client cannot reconnect to the broker by @RobertIndie in #1237
- [fix] Fix producer connection by @nodece in #1243
New Contributors
- @jayshrivastava made their first contribution in #1165
- @petermnhull made their first contribution in #1173
- @panszobe made their first contribution in #1181
- @dragosvictor made their first contribution in #1205
- @heesung-sn made their first contribution in #1210
- @adrianiacobghiula made their first contribution in #1230
- @ivan-penchev made their first contribution in #1234
v0.12.1
What's Changed
- [fix] Fix Infinite Loop in Reader's
HasNextFunction by @RobertIndie in #1182 - [fix] Fix available permits in MessageReceived by @panszobe in #1181
- [feat] Support partitioned topic reader by @RobertIndie in #1178
- [fix] Fix BytesSchema by @petermnhull in #1173
- [fix] Respect context cancellation in Flush by @jayshrivastava in #1165
- [fix] Fix SIGSEGV with zstd compression enabled by @RobertIndie in #1164
v0.12.0
What's Changed
- Improved the performance of schema and schema cache by @gunli in #1033
- Fixed return when registerSendOrAckOp() failed by @gunli in #1045
- Fixed the incorrect link in the release process by @RobertIndie in #1050
- Fixed Producer by checking if message is nil by @gunli in #1047
- Added 0.11.0 change log by @RobertIndie in #1048
- Fixed 0.11.0 change log by @RobertIndie in #1054
- Fixed issue 877 where ctx in partitionProducer.Send() was not performing as expected by @Gleiphir2769 in #1053
- Fixed Producer by stopping block request even if Value and Payload are both set by @gunli in #1052
- Improved Producer by simplifying the flush logic by @gunli in #1049
- Fixed issue 1051: inaccurate producer memory limit in chunking and schema by @Gleiphir2769 in #1055
- Fixed issue by sending Close Command on Producer/Consumer create timeout by @michaeljmarshall in #1061
- Fixed issue 1057: producer flush operation is not guaranteed to flush all messages by @Gleiphir2769 in #1058
- Fixed issue 1064: panic when trying to flush in DisableBatching=true by @Gleiphir2769 in #1065
- Fixed transaction acknowledgement and send logic for chunk message by @liangyepianzhou in #1069
- Fixed issue by closing consumer resources if creation fails by @michaeljmarshall in #1070
- Fixed issue where client reconnected every authenticationRefreshCheckSeconds when using TLS authentication by @jffp113 in #1062
- Corrected the SendAsync() description by @Gleiphir2769 in #1066
- CI: replaced license header checker and formatter by @tisonkun in #1077
- Chore: allowed rebase and merge by @tisonkun in #1080
- Adopted pulsar-admin-go sources by @tisonkun in #1079
- Reverted: allowed rebase and merge by @tisonkun in #1081
- Fixed producer by failing all messages that are pending requests when closing like Java by @graysonzeng in #1059
- Supported load config from env by @tuteng in #1089
- Fixed issue where multiple calls to client.Close causes panic by @crossoverJie in #1046
- Improved client by implementing GetLastMSgID for Reader by @liangyepianzhou in #1087
- Fixed comment for ConnectionMaxIdleTime by @massakam in #1091
- Issue 1094: connectionTimeout respects net.Dialer default timeout by @zzzming in #1095
- Supported OAuth2 with scope field by @labuladong in #1097
- Fixed issue where DisableReplication flag does not work by @massakam in #1100
- Double-checked before consumer reconnect by @zccold in #1084
- Fixed schema error by @leizhiyuan in #823
- PR-1071-1: renamed pendingItem.Complete() to pendingItem.done() by @gunli in #1109
- PR-1071-2: added sendRequest.done() to release resource together by @gunli in #1110
- Refactor: factored out validateMsg by @tisonkun in #1117
- Refactor: factored out prepareTransaction by @tisonkun in #1118
- Completed comment on ProducerInterceptor interface BeforeSend method by @ojcm in #1119
- Refactor: prepared sendrequest and moved to internalSendAsync by @tisonkun in #1120
- Fix: normalized all send request resource release into sr.done by @tisonkun in #1121
- Improvement: added func blockIfQueueFull() to encapsulate DisableBlockIfQue… by @gunli in #1122
- Improved debug log clarity in ReceivedSendReceipt() by @gunli in #1123
- Fixed issue 1098 by checking batchBuilder in case batch is disabled by @zzzming in #1099
- Fixed Producer by fixing reconnection backoff logic by @gunli in #1125
- Added 0.11.1 change log by @RobertIndie in #1092
- Fixed dead link to the KEYS file in the release process by @RobertIndie in #1127
- Improved performance by pooling sendRequest by @gunli in #1126
- Fixed argument order to Errorf in TableView message handling by @ojcm in #1130
- Fixed Producer by double-checking before reconnect by @gunli in #1131
- Fixed issue where client must not retry connecting to broker when topic is terminated by @pkumar-singh in #1128
- Issue 1132: Fixed JSONSchema unmarshalling in TableView by @ojcm in #1133
- Improved by setting dlq producerName by @crossoverJie in #1137
- Fixed channel deadlock in regexp consumer by @goncalo-rodrigues in #1141
- Fixed Producer: handled TopicNotFound/TopicTerminated/ProducerBlockedQuotaExceededException/ProducerFenced when reconnecting by @gunli in #1134
- Transaction: Avoided a panic when using transaction by @Gilthoniel in #1144
- Improved by updating connection.lastDataReceivedTime when connection is ready by @gunli in #1145
- Improved Producer by normalizing and exporting the errors by @gunli in #1143
- Updated Unsubscribe() interface comment by @geniusjoe in #1146
- Issue 1105: Fixed AutoTopicCreation for type non-partitioned by @tomjo in #1107
- Added test for admin topic creation by @RobertIndie in #1152
- Implemented GetTopicAutoCreation by @jiangpengcheng in #1151
- Bumped github.com/dvsekhvalnov/jose2go from 1.5.0 to 1.6.0 by @dependabot in #1150
- Bump golang.org/x/net from 0.0.0-20220225172249-27dd8689420f to 0.17.0 by @BewareMyPower in #1155
- Fix DLQ producer name conflicts when multiples consumers send messages to DLQ by @crossoverJie in #1156
New Contributors
- @jffp113 made their first contribution in #1062
- @tuteng made their first contribution in #1089
- @zccold made their first contribution in #1084
- @ojcm made their first contribution in #1119
- @pkumar-singh made their first contribution in #1128
- @goncalo-rodrigues made their first contribution in #1141
- @Gilthoniel made their first contribution in #1144
- @geniusjoe made their first contribution in #1146
- @tomjo made their first contribution in #1107
- @jiangpengcheng made their first contribution in #1151
- @dependabot made their first contribution in #1150