Skip to content

Commit 5d69b5d

Browse files
committed
prepare for release 3.0.0-alpha.4
1 parent 9295a28 commit 5d69b5d

File tree

3 files changed

+29
-27
lines changed

3 files changed

+29
-27
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ All notable changes to this project will be documented in this file. This change
33

44
## Unreleased Changes
55

6+
## 3.0.0-alpha.4 - 2019-07-29
7+
- Remove old metrics from being sent
68

79
## 3.0.0-alpha.3 - 2019-07-10
810
- Adds middleware support

README.md

+26-26
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ from a clojure application such that a user only needs to pass a function that w
3636

3737
Refer [concepts](doc/CONCEPTS.md) to understand the concepts referred to in this document.
3838

39-
## Dev Setup
39+
## Dev Setup
4040
(For mac users only)
4141

4242
- Install Clojure: ```brew install clojure```
@@ -57,29 +57,29 @@ Upgrade Guide to 3.x refer [here](UpgradeGuide.md)
5757

5858
Add this to your project.clj:
5959

60-
`[tech.gojek/ziggurat "3.0.0-alpha"]`
60+
`[tech.gojek/ziggurat "3.0.0-alpha.4"]`
6161

62-
or for latest stable version
62+
or for latest stable version
6363

64-
`[tech.gojek/ziggurat "2.10.2"]`
64+
`[tech.gojek/ziggurat "2.12.3"]`
6565

6666
To start a stream (a thread that reads messages from Kafka), add this to your core namespace.
6767
```clojure
6868
(require '[ziggurat.init :as ziggurat])
69-
69+
7070
(defn start-fn []
7171
;; your logic that runs at startup goes here
7272
)
73-
73+
7474
(defn stop-fn []
7575
;; your logic that runs at shutdown goes here
7676
)
77-
77+
7878
(defn main-fn
7979
[message]
8080
(println message)
8181
:success)
82-
82+
8383
(ziggurat/main start-fn stop-fn {:stream-id {:handler-fn main-fn}})
8484
```
8585

@@ -106,33 +106,33 @@ Please refer to the [Middleware section](#middleware-in-ziggurat)
106106
(defn start-fn []
107107
;; your logic that runs at startup goes here
108108
)
109-
109+
110110
(defn stop-fn []
111111
;; your logic that runs at shutdown goes here
112112
)
113-
114-
113+
114+
115115
(defn handler-function [_request]
116116
{:status 200
117117
:headers {"Content-Type" "application/json"}
118118
:body (get-resource)})
119-
119+
120120
(def routes [["v1/resources" {:get handler-function}]])
121-
121+
122122
(defn main-fn
123123
[message]
124124
(println message)
125125
:success)
126-
126+
127127
(ziggurat/main start-fn stop-fn {:stream-id {:handler-fn main-fn}} routes)
128128

129129
```
130130
Ziggurat also sets up a HTTP server by default and you can pass in your own routes that it will serve. The above example demonstrates
131-
how you can pass in your own route.
131+
how you can pass in your own route.
132132

133-
or
133+
or
134134
```clojure
135-
(ziggurat/main {:start-fn start-fn
135+
(ziggurat/main {:start-fn start-fn
136136
:stop-fn stop-fn
137137
:stream-routes {:stream-id {:handler-fn main-fn}}
138138
:actor-routes routes
@@ -143,7 +143,7 @@ This will start both api-server and stream-worker modes
143143

144144
There are four modes supported by ziggurat
145145
```
146-
:api-server - Mode by which only server will be started with actor routes and management routes(Dead set management)
146+
:api-server - Mode by which only server will be started with actor routes and management routes(Dead set management)
147147
:stream-worker - Only start the server plus rabbitmq for only producing the messages for retry and channels
148148
:worker - Starts the rabbitmq consumer for retry and channel
149149
:management-api - Servers only routes which used for deadset management
@@ -161,24 +161,24 @@ or define their custom middlewares.
161161
The default middleware `default/protobuf->hash` assumes that the message is serialized in proto format.
162162
```clojure
163163
(require '[ziggurat.init :as ziggurat])
164-
164+
165165
(defn start-fn []
166166
;; your logic that runs at startup goes here
167167
)
168-
168+
169169
(defn stop-fn []
170170
;; your logic that runs at shutdown goes here
171171
)
172-
172+
173173
(defn main-fn
174174
[message]
175175
(println message)
176176
:success)
177-
177+
178178
(def handler-fn
179179
(-> main-fn
180180
(middleware/protobuf->hash ProtoClass :stream-id)))
181-
181+
182182
(ziggurat/main start-fn stop-fn {:stream-id {:handler-fn handler-fn}})
183183
```
184184

@@ -261,12 +261,12 @@ All Ziggurat configs should be in your `clonfig` `config.edn` under the `:ziggur
261261
* producer - Configuration for KafkaProducer. Currently, only following options are supported. Please see [Producer Configs](https://kafka.apache.org/documentation/#producerconfigs) for detailed explanation for each of the configuration parameters.
262262
* bootstrap.servers - A list of host/port pairs to use for establishing the initial connection to the Kafka cluster.
263263
* acks - The number of acknowledgments the producer requires the leader to have received before considering a request complete. Valid values are [all, -1, 0, 1].
264-
* retries - Setting a value greater than zero will cause the client to resend any record whose send fails with a potentially transient error.
264+
* retries - Setting a value greater than zero will cause the client to resend any record whose send fails with a potentially transient error.
265265
* key.serializer - Serializer class for key that implements the org.apache.kafka.common.serialization.Serializer interface.
266266
* value.serializer - Serializer class for value that implements the org.apache.kafka.common.serialization.Serializer interface.
267267
* max.in.flight.requests.per.connection - The maximum number of unacknowledged requests the client will send on a single connection before blocking.
268-
* enable.idempotence - When set to 'true', the producer will ensure that exactly one copy of each message is written in the stream. If 'false', producer retries due to broker failures, etc., may write duplicates of the retried message in the stream.
269-
268+
* enable.idempotence - When set to 'true', the producer will ensure that exactly one copy of each message is written in the stream. If 'false', producer retries due to broker failures, etc., may write duplicates of the retried message in the stream.
269+
270270
* datadog - The statsd host and port that metrics should be sent to, although the key name is datadog, it supports statsd as well to send metrics.
271271
* sentry - Whenever a :failure keyword is returned from the mapper-function or an exception is raised while executing the mapper-function, an event is sent to sentry. You can skip this flow by disabling it.
272272
* rabbit-mq-connection - The details required to make a connection to rabbitmq. We use rabbitmq for the retry mechanism.

project.clj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(defproject tech.gojek/ziggurat "3.0.0-alpha.3"
1+
(defproject tech.gojek/ziggurat "3.0.0-alpha.4"
22
:description "A stream processing framework to build stateless applications on kafka"
33
:url "https://github.com/gojektech/ziggurat"
44
:license {:name "Apache License, Version 2.0"

0 commit comments

Comments
 (0)