
org.reactivecommons.async.rabbit.standalone.config.EventBusConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of async-commons-rabbit-standalone Show documentation
Show all versions of async-commons-rabbit-standalone Show documentation
Abstract your broker with semantic async messages
The newest version!
package org.reactivecommons.async.rabbit.standalone.config;
import org.reactivecommons.api.domain.DomainEventBus;
import org.reactivecommons.async.rabbit.RabbitDomainEventBus;
import org.reactivecommons.async.rabbit.communications.ReactiveMessageSender;
import static reactor.rabbitmq.ExchangeSpecification.exchange;
public class EventBusConfig {
private String domainEventsExchangeName;
public EventBusConfig(String domainEventsExchangeName) {
this.domainEventsExchangeName = domainEventsExchangeName;
}
public DomainEventBus domainEventBus(ReactiveMessageSender sender) {
sender.getTopologyCreator().declare(exchange(domainEventsExchangeName).durable(true).type("topic")).subscribe();
return new RabbitDomainEventBus(sender, domainEventsExchangeName);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy