Skip to content

Commit 7b7005f

Browse files
committed
add: app readme
1 parent 369e229 commit 7b7005f

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

example/readme.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
## Application example
2+
3+
RESTapi service.
4+
5+
### Tech stack
6+
7+
* [Akka (actor, http, stream)](https://akka.io/)
8+
* [Consul-client java](https://github.com/rickfast/consul-client)
9+
* [Shade plugin](https://maven.apache.org/plugins/maven-shade-plugin/) for fat-jar
10+
* Java 8
11+
* Docker
12+
13+
### REST
14+
15+
| REQUEST | RESPONSE |
16+
| ------------- |:-------------: |
17+
| GET /health | 200 OK and app-id |
18+
| POST /app | 200 OK |
19+
20+
21+
### Notes
22+
23+
Pay attention to config file `application.conf`, it is loaded by [typesafe config](https://github.com/lightbend/config).
24+
25+
`DiscoveryAgentActor` responsible for registration this app instance in consul and send each (10 sec default) health check to consul.
26+
27+

example/src/main/java/ru/zhenik/akka/example/infrastructure/discovery/DiscoveryAgentActor.java

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public Receive createReceive() {
7676
// send each (10seconds default) health-check to consul
7777
.scheduler()
7878
.schedule(
79+
// delay before 1st request
7980
new FiniteDuration(5, TimeUnit.SECONDS),
8081
SCHEDULED_WORK_DELAY,
8182
healthCheck(),

0 commit comments

Comments
 (0)