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

org.apereo.cas.ticket.registry.JmsTicketRegistryDefaultPublisher Maven / Gradle / Ivy

There is a newer version: 6.6.15.2
Show newest version
package org.apereo.cas.ticket.registry;

import org.apereo.cas.ticket.registry.queue.BaseMessageQueueCommand;

import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.jms.core.JmsTemplate;

/**
 * This is {@link JmsTicketRegistryDefaultPublisher}.
 *
 * @author Misagh Moayyed
 * @since 6.1.0
 */
@Slf4j
@RequiredArgsConstructor
@Getter
public class JmsTicketRegistryDefaultPublisher implements JmsTicketRegistryPublisher {
    private final JmsTemplate jmsTemplate;

    @Override
    public void publishMessageToQueue(final BaseMessageQueueCommand cmd) {
        jmsTemplate.convertAndSend(QUEUE_DESTINATION, cmd,
            message -> {
                LOGGER.trace("Sending message [{}] from ticket registry id [{}]", message, cmd.getId());
                return message;
            });
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy