All Downloads are FREE. Search and download functionalities are using the official Maven repository.

co.com.bancolombia.commons.jms.internal.sender.MQDomainContextSender Maven / Gradle / Ivy

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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy