apache/pulsar-client-go

[BUG] calling `NewTransaction` always fails after reconnection happens

itgram opened this issue · 2 comments

Expected behavior

Tell us what should happen

When calling the NewTransaction client method, after connection closed abnormally and return again,
the method suppose to return a new transaction.

Actual behavior

Tell us what happens instead
but actually the method return "connection closed" error,
and after investigating the client library v0.12.1 i found the transaction use a different connection pool which not in sync with the client connection pool

Steps to reproduce

How can we reproduce the issue

  • connect to pulsar server
  • loop and create a new transaction with 2 second delay for example time.Sleep(2*time.Second)
  • restart apache pulsar server manually
  • calling of NewTransaction will return "connection closed" error.

System configuration

Pulsar version: pulsar-client-go v0.12.1

What's your server version? I think after broker restarted, old tcp connections were finished, and we need to reinitialize a new client and build a new transaction with this new client.

What's your server version? I think after broker restarted, old tcp connections were finished, and we need to reinitialize a new client and build a new transaction with this new client.

my server version is 3.2.3

as I mentioned the issue related to the pulsar-client-go library
which is built to establish the publisher and consumer automatically after reconnection happens
and ignored this feature with the transaction

thanks for reply