The first step is to code our Constants class. This class is a static class with all of the Constants needed in our project.
Open the project with your favorite IDE and, under the src/main/java/kioto directory, create a file called Constants.java with the content of Listing 4.3.
The following is the content of Listing 4.3, Constants.java:
package kioto;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.databind.util.StdDateFormat;
public final class Constants {
private static final ObjectMapper jsonMapper;
static {
ObjectMapper mapper = new ObjectMapper();
mapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
mapper.setDateFormat(new StdDateFormat());
jsonMapper = mapper;
}
public static String getHealthChecksTopic() {
return "healthchecks"...