
org.reactivecommons.async.kafka.KafkaDomainEventBus Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of async-kafka Show documentation
Show all versions of async-kafka Show documentation
Abstract your broker with semantic async messages
package org.reactivecommons.async.kafka;
import io.cloudevents.CloudEvent;
import lombok.AllArgsConstructor;
import org.reactivecommons.api.domain.DomainEvent;
import org.reactivecommons.api.domain.DomainEventBus;
import org.reactivecommons.async.kafka.communications.ReactiveMessageSender;
import org.reactivestreams.Publisher;
@AllArgsConstructor
public class KafkaDomainEventBus implements DomainEventBus {
public static final String NOT_IMPLEMENTED_YET = "Not implemented yet";
private final ReactiveMessageSender sender;
@Override
public Publisher emit(DomainEvent event) {
return sender.send(event);
}
@Override
public Publisher emit(String domain, DomainEvent event) {
throw new UnsupportedOperationException(NOT_IMPLEMENTED_YET);
}
@Override
public Publisher emit(CloudEvent event) {
return sender.send(event);
}
@Override
public Publisher emit(String domain, CloudEvent event) {
throw new UnsupportedOperationException(NOT_IMPLEMENTED_YET);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy