Skip to content

Commit

Permalink
Merge ec73bb2 into c8343fb
Browse files Browse the repository at this point in the history
  • Loading branch information
anmol1vw13 committed Aug 16, 2021
2 parents c8343fb + ec73bb2 commit 2acf073
Show file tree
Hide file tree
Showing 31 changed files with 4,596 additions and 197 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
8 changes: 3 additions & 5 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@
[org.clojure/clojure "1.10.3"]
[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"]
[clojusc/protobuf "3.5.1-v1.1"] ;Compile all the proto with only protoc version 3.5.1 since clojusc supports only till 3.5.1
[prismatic/schema "1.1.12"]
[clj-statsd "0.4.0"]
[ring/ring "1.9.3"]
Expand All @@ -62,14 +61,13 @@
:pedantic? :warn
:java-source-paths ["src/com"]
:aliases {"code-coverage" ["with-profile" "test" "cloverage" "--output" "coverage" "--lcov"]}
:aot [ziggurat.kafka-consumer.invalid-return-type-exception ziggurat.init ziggurat.config ziggurat.producer ziggurat.sentry ziggurat.metrics ziggurat.fixtures]
:aot [ziggurat.kafka-consumer.invalid-return-type-exception]
:profiles {:uberjar {:aot :all
:global-vars {*warn-on-reflection* true}
: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"]
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;
bytes image = 6;

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

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

message Tag {
int32 person_id = 1;
int32 y_coord = 3;
int32 width = 4;
int32 height = 5;
}
}
18 changes: 18 additions & 0 deletions resources/proto/message-payload.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
syntax = "proto3";
// use protoc v3.17.3 to compile the proto
package com.ziggurat.proto;

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

message MessagePayload {
message Metadata{
string topic = 1;
int64 timestamp = 2;
int32 partition = 3;
}
bytes message = 1;
string topic_entity = 2;
int32 retry_count = 3;
Metadata metadata = 4;
}
File renamed without changes.

0 comments on commit 2acf073

Please sign in to comment.