co.com.bancolombia.commons.jms.internal.sender.MQDomainContextSender Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commons-jms-utils Show documentation
Show all versions of commons-jms-utils Show documentation
A performant abstraction on top of JMS
The newest version!
package co.com.bancolombia.commons.jms.internal.sender;
import co.com.bancolombia.commons.jms.api.MQDomainMessageSender;
import co.com.bancolombia.commons.jms.api.MQMessageCreator;
import co.com.bancolombia.commons.jms.api.MQMessageSender;
import jakarta.jms.Destination;
import lombok.AllArgsConstructor;
import reactor.core.publisher.Mono;
import java.util.TreeMap;
@AllArgsConstructor
public class MQDomainContextSender implements MQDomainMessageSender {
private final TreeMap senders; //
@Override
public Mono send(String domain, Destination destination, MQMessageCreator messageCreator) {
return senders.get(domain).send(destination, messageCreator);
}
@Override
public Mono send(String domain, MQMessageCreator messageCreator) {
return senders.get(domain).send(messageCreator);
}
@Override
public MQMessageSender forDomain(String domain) {
return senders.get(domain);
}
}