protected void publishMessage(final BaseMessageQueueCommand cmd, final String topic) throws Exception {
        LOGGER.debug("[{}] is publishing message [{}]", cmd.getPublisherIdentifier().getId(), cmd);
        val future = kafkaOperations.send(topic, cmd.getPublisherIdentifier().getId(), cmd);
        Objects.requireNonNull(future);
        future.whenComplete((result, error) -> {
            if (error != null) {
                LOGGER.error("Failed to publish message [{}]: [{}]", cmd, error);
            } else {
                LOGGER.trace("Sent message [{}] from ticket registry id [{}]", cmd, cmd.getPublisherIdentifier());
            }
            applicationContext.publishEvent(new KafkaMessagePublishedEvent(this, topic, cmd));
        }).get();
    }
This is {@link KafkaTicketRegistryPublisher}.

@author Misagh Moayyed
@since 7.2.0
support/cas-server-support-kafka-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/publisher/KafkaTicketRegistryPublisher.java