/broker/status endpoint returns incorrect 204 when ActiveMQ is shut down

Steps to reproduce

Steps to reproduce:
1. Start ActiveMQ
2. Start Opencast
3. Stop ActiveMQ
4. GET request to /broker/status

Actual Results:

/broker/status returns 204

Expected Results:

Should return 503.

Workaround (if any):

Use another way to monitor ActiveMQ.

Activity

Show:
Stephen Marquard
August 22, 2017, 11:50 PM

MessageBrokerServiceEndpoint.java:

public Response getStatus() {
if (messageReceiver.reconnect() && messageSender.reconnect()) {
return Response.status(SC_NO_CONTENT).build();
}
return Response.status(SC_SERVICE_UNAVAILABLE).build();
}

reconnect() is in MessageBaseFacility.java.

Fixed and reviewed

Assignee

Unassigned

Reporter

Stephen Marquard

Severity

Incorrectly Functioning With Workaround

Tags (folksonomy)

None

Components

Fix versions

Affects versions

Priority

Major