aParentEventDispatcher.registerEventDispatcher(this);
}
@Override
public void dispatch(DispatchableDomainEvent aDispatchableDomainEvent) {
Notification notification =
new Notification(
aDispatchableDomainEvent.eventId(),
aDispatchableDomainEvent.domainEvent());
MessageParameters messageParameters =
MessageParameters.durableTextParameters(
notification.typeName(),
Long.toString(notification.notificationId()),
notification.occurredOn());
String serializedNotification =
NotificationSerializer.instance().serialize(notification);
this.messageProducer.send(serializedNotification, messageParameters);