@Override
    public Ticket addSingleTicket(final Ticket ticket) throws Exception {
        addTicketToQueue(ticket);

        if (ticketPublisher.isEnabled()) {
            LOGGER.trace("Publishing add command for id [{}] and ticket [{}]", publisherIdentifier, ticket.getId());
            val command = new AddTicketMessageQueueCommand(publisherIdentifier, ticket);
            ticketPublisher.publishMessageToQueue(command);
        }
        return ticket;
    }
This is {@link AbstractMapBasedTicketRegistry}.

@author Misagh Moayyed
@since 5.2.0
core/cas-server-core-tickets-api/src/main/java/org/apereo/cas/ticket/registry/AbstractMapBasedTicketRegistry.java