-
Notifications
You must be signed in to change notification settings - Fork 56
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
Enhance config #228
Enhance config #228
Conversation
.../main/scripts/io/aklivity/zilla/specs/binding/grpc/kafka/schema/grpc.kafka.schema.patch.json
Outdated
Show resolved
Hide resolved
.../main/scripts/io/aklivity/zilla/specs/binding/grpc/kafka/schema/grpc.kafka.schema.patch.json
Outdated
Show resolved
Hide resolved
.../main/scripts/io/aklivity/zilla/specs/binding/grpc/kafka/schema/grpc.kafka.schema.patch.json
Outdated
Show resolved
Hide resolved
...aklivity/zilla/runtime/binding/grpc/kafka/internal/config/GrpcKafkaOptionsConfigAdapter.java
Outdated
Show resolved
Hide resolved
...io/aklivity/zilla/runtime/binding/grpc/kafka/internal/config/GrpcKafkaWithProduceResult.java
Outdated
Show resolved
Hide resolved
...a/io/aklivity/zilla/runtime/binding/kafka/grpc/internal/config/KafkaGrpcConditionConfig.java
Show resolved
Hide resolved
...livity/zilla/runtime/binding/kafka/grpc/internal/config/KafkaGrpcConditionConfigAdapter.java
Outdated
Show resolved
Hide resolved
...aklivity/zilla/runtime/binding/kafka/grpc/internal/config/KafkaGrpcOptionsConfigAdapter.java
Outdated
Show resolved
Hide resolved
.../aklivity/zilla/runtime/binding/kafka/grpc/internal/stream/KafkaGrpcRemoteServerFactory.java
Outdated
Show resolved
Hide resolved
...ty/zilla/runtime/binding/kafka/grpc/internal/config/KafkaGrpcConditionConfigAdapterTest.java
Outdated
Show resolved
Hide resolved
@@ -63,7 +63,7 @@ public JsonObject adaptToJson( | |||
if (condition.service != null) | |||
{ | |||
String method = condition.service; | |||
method = condition.method != null ? method + "/" + condition.method : method; | |||
method = condition.method != null ? String.format("%s/%s", method, condition.method) : method; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we have /*
on the end when the method
is null
instead of just the service
by itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the user has specified method: test
then it doesn't expect /* I think no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the schema, we only have method
now, but we're parsing the value into service
and method
, where the service
part is required.
However, having the syntax method: test
to mean the service is test
and the method is *
is too confusing, agree?
Recommend we change the pattern to require <Service>/<Method>
where <Method>
can be *
, so that method: test/*
means service test
and any method.
String method = condition.service; | ||
method = condition.method != null ? method + "/" + condition.method : method; | ||
method = condition.method != null ? String.format("%s/%s", method, condition.method) : method; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String method = condition.service; | |
method = condition.method != null ? method + "/" + condition.method : method; | |
method = condition.method != null ? String.format("%s/%s", method, condition.method) : method; | |
String method = String.format("%s/%s", condition.service, condition.method != null ? condition.method : "*"); |
@@ -164,9 +164,6 @@ public GrpcKafkaWithProduceResult resolveProduce( | |||
|
|||
GrpcKafkaWithProduceHash hash = new GrpcKafkaWithProduceHash(octetsRW, dashOctetsRW, correlationId, hashBytesRW); | |||
hash.digestHash(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to call digestHash()
here?
Description
Improve config
Fixes #226