Skip to content

Commit

Permalink
Merge 3f259a0 into c4c6d81
Browse files Browse the repository at this point in the history
  • Loading branch information
macalimlim authored Jul 23, 2021
2 parents c4c6d81 + 3f259a0 commit d51cc83
Show file tree
Hide file tree
Showing 28 changed files with 4,477 additions and 536 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,8 @@ test-cluster: setup-cluster
coverage: setup
lein code-coverage
docker-compose down

proto:
protoc -I=resources --java_out=test/ resources/proto/example.proto
protoc -I=resources --java_out=test/ resources/proto/person.proto
protoc -I=resources --java_out=src/ resources/proto/message-payload.proto
10 changes: 5 additions & 5 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
[org.clojure/tools.logging "1.1.0"]
[nrepl/nrepl "0.8.3"]
[clojusc/protobuf "3.5.1-v1.1"]
[org.flatland/protobuf "0.8.1"]
[prismatic/schema "1.1.12"]
[clj-statsd "0.4.0"]
[ring/ring "1.9.3"]
Expand All @@ -53,7 +52,8 @@
com.fasterxml.jackson.core/jackson-core
com.fasterxml.jackson.dataformat/jackson-dataformat-smile
com.fasterxml.jackson.dataformat/jackson-dataformat-cbor]]
[metosin/ring-swagger-ui "3.46.0"]]
[metosin/ring-swagger-ui "3.46.0"]
[com.google.protobuf/protobuf-java "3.17.3"]] ;; NOTE: protoc should have same version as this
:deploy-repositories [["clojars" {:url "https://clojars.org/repo"
:username :env/clojars_username
:password :env/clojars_password
Expand All @@ -68,12 +68,12 @@
:pedantic? :abort}
:test {:java-source-paths ["src/com" "test/com"]
:jvm-opts ["-Dlog4j.configurationFile=resources/log4j2.test.xml"]
:dependencies [[com.google.protobuf/protobuf-java "3.17.0"]
[junit/junit "4.13.2"]
:dependencies [[junit/junit "4.13.2"]
[org.hamcrest/hamcrest-core "2.2"]
[org.apache.kafka/kafka-streams "2.8.0" :classifier "test" :exclusions [org.slf4j/slf4j-log4j12 log4j]]
[org.apache.kafka/kafka-clients "2.8.0" :classifier "test"]
[org.clojure/test.check "1.1.0"]]
[org.clojure/test.check "1.1.0"]
[com.google.protobuf/protobuf-java "3.17.3"]] ;; NOTE: protoc should have same version as this
:plugins [[lein-cloverage "1.0.13" :exclusions [org.clojure/clojure]]]
:repositories [["confluent-repo" "https://packages.confluent.io/maven/"]]}
:dev {:plugins [[lein-ancient "0.6.15"]
Expand Down
2 changes: 1 addition & 1 deletion resources/config.test.edn
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
:worker-count [10 :int]
:queue-size [10 :int]
:thread-termination-wait-s [1 :int]}
:rabbit-mq-connection {:host "127.0.0.1"
:rabbit-mq-connection {:host "localhost"
:port [5672 :int]
:username "guest"
:password "guest"
Expand Down
29 changes: 29 additions & 0 deletions resources/proto/example.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
syntax = "proto3";

package com.gojek.test.proto;

option java_package = "com.gojek.test.proto";
option java_outer_classname = "Example";

message Photo {
int32 id = 1;
string path = 2;
optional bytes image = 6;

message Label {
string item = 1;
bool exists = 2;
}

message Attr {
string key = 1;
optional string val = 2;
}

message Tag {
int32 person_id = 1;
optional int32 y_coord = 3;
optional int32 width = 4;
optional int32 height = 5;
}
}
12 changes: 12 additions & 0 deletions resources/proto/message-payload.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
syntax = "proto3";

package com.ziggurat.proto;

option java_package = "com.ziggurat.proto";
option java_outer_classname = "MessagePayloadProto";

message MessagePayload {
bytes message = 1;
string topic_entity = 2;
int32 retry_count = 3;
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ message Person {
string email = 3;
string likes = 4;
google.protobuf.Struct characters = 5;
}
}
Loading

0 comments on commit d51cc83

Please sign in to comment.