Configure QueueBrowser's pulsar reader with subscription name#118
Open
michaeljmarshall wants to merge 5 commits intodatastax:masterfrom
Open
Configure QueueBrowser's pulsar reader with subscription name#118michaeljmarshall wants to merge 5 commits intodatastax:masterfrom
michaeljmarshall wants to merge 5 commits intodatastax:masterfrom
Conversation
Test might fail. I couldn't figure out how to run it locally, so I might need to iterate on the remote CI.
eolivelli
approved these changes
Apr 8, 2024
eolivelli
suggested changes
Apr 8, 2024
| .readerName("jms-queue-browser-" + UUID.randomUUID()) | ||
| .startMessageId(seekMessageId) | ||
| .startMessageIdInclusive() | ||
| .subscriptionName(queueSubscriptionName) |
Contributor
There was a problem hiding this comment.
this is probably not going to work
because:
- the name of the subscription is unique, and you are going to use an existing name, the behavior is unpredictable (you have a Durable and a NonDurable subscription with the same name)
- you cannot run to QueueBrowsers concurrenly
II suggest to make this name configurable at PulsarConnectionFactory level, this is basically the name of the tool that you are using to monitor the topic and not the application itself.
Or alternatively we have to add a uuid suffix to this name:
- the name is still bound to the original queueSubcriptionName
- the name is unique
…rowser-reader-sub
The merge from upstream/master broke the test's compilation. I am not sure if this test passes yet.
Member
Author
|
@eolivelli - this passes tests locally now, for me. My one higher level concern is whether datastax/pulsar#246 will break any other components that rely on readers. Does the JMS implementation for transactions have any dependency on them? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
QueueBrowserconnects to Pulsar using aReader. A reader looks like a normal consumer from the pulsar protocol perspective. It is associated with a subscription name, which is later used by the authorization framework to determine if the client'srolehas permission to perform the action on the subscription, even though the subscription is not technically used. Therefore, we need to make sure we can configure the subscription name if we're connecting as a non-admin role.