private static ObjectMapper createObjectMapper() {
    ObjectMapper objectMapper = new ObjectMapper();
    SimpleModule module = new SimpleModule("DrainModule");
    module.addSerializer(DrainNotification.class, new DrainNotificationSerializer());
    module.addDeserializer(DrainNotification.class, new DrainNotificationDeserializer());
    objectMapper.registerModule(module);
    objectMapper.registerSubtypes(new NamedType(DrainNotification.class));
    return objectMapper;
  }
Wraps a ObjectMapper for serializing and deserializing Drain Notification Messages.
samza-core/src/main/java/org/apache/samza/drain/DrainNotificationObjectMapper.java