Package org.acemq.spring.boot.actuate
Class AceMqEndpoint
java.lang.Object
org.acemq.spring.boot.actuate.AceMqEndpoint
The
acemq actuator endpoint: every AceListener, its
queue, whether it is running, and the counters its consumers keep.
GET /actuator/acemq-- every listener, by id.GET /actuator/acemq/{id}-- one listener.POST /actuator/acemq/{id}with{"state": "stopped"}or{"state": "running"}-- stop or start it. Stopping drains: it waits up toacemq.listener.shutdown-timeoutfor the messages in flight, so the request can take that long. Starting checks that the queue exists first.
Write access is what Spring Boot grants any endpoint unless told otherwise;
management.endpoint.acemq.access=read-only keeps the reads and refuses the writes.
The endpoint is not exposed over HTTP until management.endpoints.web.exposure.include
names it.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA running listener's counters, from its consumer group.static final recordOne listener.static final recordEvery listener. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionStarts or stops a listener.
-
Constructor Details
-
AceMqEndpoint
-
-
Method Details
-
listeners
- Returns:
- every listener, by id
-
listener
- Parameters:
id- the listener id- Returns:
- the listener, or
null, which the endpoint answers with 404
-
setState
Starts or stops a listener.- Parameters:
id- the listener idstate-runningorstopped- Returns:
- the listener as it is now, or
null(404) when there is no such listener
-