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

Multiple Filter Subjects and Subject validation changes #965

Merged
merged 25 commits into from
Sep 19, 2023

Conversation

scottf
Copy link
Contributor

@scottf scottf commented Sep 1, 2023

1. Support for Multiple Filter Subjects feature in Server 2.10
2. Changes and consistency for Subject validation
3. Changes and consistency for Queue name validation

Copy link
Collaborator

@arondi arondi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor stuff

@@ -375,14 +375,14 @@ public interface JetStream {
* <p>See {@link io.nats.client.Connection#createDispatcher(MessageHandler) createDispatcher} for
* information about creating an asynchronous subscription with callbacks.
*
* @param subject the subject to subscribe to
* @param subscribeSubject the subject to subscribe to
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Document when this can be empty or null

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

* Gets the max filter subject of this consumer configuration.
* @return the filter subject.
* Gets the first filter subject of this consumer configuration. Will be null if there are none.
* @return the first filter subject.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make this deprecated?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's fine.

// 2. figure out user provided subjects and prepare the userCcFilterSubjects
userSubscribeSubject = emptyAsNull(userSubscribeSubject);
List<String> userCcFilterSubjects = new ArrayList<>();
if (userCC.getFilterSubject() == null) { // empty filterSubjects gives gives null
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

String subj;
if (consumerCreate290Available) {
if (consumerCreate290Available && !multipleFilterSubject) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add a code comment for this block

@scottf scottf changed the title Multiple Filter Subjects 2.10 Feature Multiple Filter Subjects and Subject validation changes Sep 19, 2023
Copy link
Collaborator

@arondi arondi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@scottf scottf merged commit c9e6762 into main Sep 19, 2023
2 checks passed
@scottf scottf deleted the multiple-filter-subjects branch September 19, 2023 18:30
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

Successfully merging this pull request may close these issues.

None yet

2 participants