publisher.publish(new Message<AddressEntry>("address-created", value));
}
@EventHandler
public void handleAddressRemovedEvent(AddressRemovedEvent event) {
ContactEntry contactEntry = obtainContactByIdentifier(event.getContactId());
logger.debug("Received an address removed event with type {} for contact {}",
event.getType(),
contactEntry.getIdentifier());
Map<String, Object> message = new HashMap<String, Object>();
message.put("contact", contactEntry);
message.put("addressType", event.getType());
publisher.publish(new Message<Map<String, Object>>("address-removed", message));
}