Skip to main content

1. Hello worker

The smallest useful thing: an application that introduces itself to the Core and keeps saying it is alive. No processes yet.

You need a Core running — see Run the Core.

Connect

Add the starter, then:

application.yaml
spring:
application:
name: hello-worker

synapsys:
core-url: http://localhost:8080

Start the application. That is all — the starter begins heartbeating on boot.

What you should see

Open http://localhost:8080. Within five seconds hello-worker appears, marked active, with no processes.

Stop the application — or press Ctrl-C on the loop — and the worker goes inactive shortly after. Nothing told the Core it was leaving; it simply stopped hearing from it.

What just happened

There was no registration step. The first heartbeat created the worker, and every heartbeat after it renewed the liveness. This is why workerName must be stable: change it and the Core sees a different worker, not the same one renamed.

Next: an endless process.