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

Metadata on consumer can present UNKNOWN_TOPIC_OR_PART error #105

Open
sshanks-kx opened this issue Jan 22, 2024 · 7 comments
Open

Metadata on consumer can present UNKNOWN_TOPIC_OR_PART error #105

sshanks-kx opened this issue Jan 22, 2024 · 7 comments
Assignees

Comments

@sshanks-kx
Copy link
Contributor

sshanks-kx commented Jan 22, 2024

Running .kfk.Metadata[client]; from consumer can present callback msg as follows:

mtype                 topic client partition offset msgtime data                                                                        key      headers                 rcvtime                      
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
UNKNOWN_TOPIC_OR_PART test1 0      0         -1001          "Subscribed topic not available: test1: Broker: Unknown topic or partition" `byte$() (`symbol$())!`symbol$() 2024.01.22D15:46:39.829536000

when doing this after doing a subscribe, it can make it look like the subscription had failed (when it hasn't).

Temp removing .kfk.Metadata[client]; after any subscription, the callback no longer fires with a UNKNOWN_TOPIC_OR_PART. It doesn't appear to stop the subscription from occurring, whether its there or not.

Will find out why & change this effect

@sshanks-kx sshanks-kx self-assigned this Jan 22, 2024
@sshanks-kx sshanks-kx mentioned this issue Jan 22, 2024
@sshanks-kx
Copy link
Contributor Author

Occurs every time .kfk.Metadata[client] called after subscription is made (e.g. call twice, get 2 UNKNOWN_TOPIC_OR_PART msgs).
Doesn't occur when called prior to any subscription.

@sshanks-kx
Copy link
Contributor Author

Created librdkafka issue confluentinc/librdkafka#4589 (can see same occurrence without using kdb+).
Current workaround is that if you need to use .kfk.Metadata to see topics/etc, call it prior to subscription.

sshanks-kx added a commit to sshanks-kx/kafka that referenced this issue Jan 24, 2024
running test_consumer.q, test_producer.q now presents meta info better
test_consumer.q also now prevented from producing erroneous UNKNOWN_TOPIC_OR_PART msg
sshanks-kx added a commit that referenced this issue Jan 24, 2024
running test_consumer.q, test_producer.q now presents meta info better
test_consumer.q also now prevented from producing erroneous UNKNOWN_TOPIC_OR_PART msg
@sshanks-kx
Copy link
Contributor Author

Update now on linked issue. May be issue with librdkafka. To try possible fix.

@sshanks-kx
Copy link
Contributor Author

sshanks-kx commented Mar 27, 2024

Tested with the pending librdkafka pull request - bug still appears to be there. Informed librdkafka dev. Current workaround is to do any metadata request prior to subscription.

@sshanks-kx
Copy link
Contributor Author

bug doesnt occur with v2.0.2 of librdkafka. will await response from librdkafka devs.

@sshanks-kx
Copy link
Contributor Author

looks like its working again on latest pr change to librdkafka (issue linked above). tested with kdb+. will await future librdkafka release to see if it makes it in.

@sshanks-kx
Copy link
Contributor Author

Fixed in underlying librdkafka 2.4.0

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

1 participant