Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add the ability to query the version of the client #471

Open
alanhowells opened this issue Jan 9, 2025 · 1 comment
Open

Comments

@alanhowells
Copy link

Background

We develop an application that is able to run with or without pulsar installed, and for that to happen, we do not link with pulsar client (statically or dynamically).

Instead, we load the pulsar client library at runtime (using dlopen) and use the C-API to do what needs to be done.

This means that it is our customers responsibility to install and configure pulsar, and they could use any version.

Request

Since we don't know the version of the pulsar client library at runtime, we cannot make full decisions on the differences of those versions.
E.g. When trying to use the pattern subscribe with the 2.9.2 client, there was an unhandled exception cancelling the topic refresh thread after unsubscribing. This caused our application to crash. This is now fixed in 3.0, but we want to disable that feature if using an older client.

It would be useful to query the client library as to what version it is.

This would also be useful for our logging so we can see what version a customer has installed, and try to reproduce their environment (note that customers don't always tell you the truth, logging information proves what they tell you).

Another useful feature (again for logging purposes) would be to know what the version of the server/broker the client is connected to. It will help with narrowing down problems and reproducing issues.

@BewareMyPower
Copy link
Contributor

Currently, pulsar/Version.h that includes two macros that can tell the version info. It seems that you want a C function for this purpose, right?

This would also be useful for our logging so we can see what version a customer has installed,

If the client is connected to the topic, you can query the client version from the topic stats

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants