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

com.icthh.xm.commons.topic.util.MessageRetryUtils Maven / Gradle / Ivy

The newest version!
package com.icthh.xm.commons.topic.util;

import com.icthh.xm.commons.logging.util.MdcUtils;
import lombok.experimental.UtilityClass;
import org.apache.kafka.clients.consumer.ConsumerRecord;

import java.util.StringJoiner;

import static com.icthh.xm.commons.topic.util.MessageRetryDetailsUtils.getRid;

@UtilityClass
public class MessageRetryUtils {

    public static void putRid(ConsumerRecord record, String tenantKey, String topicName) {
        MdcUtils.putRid(new StringJoiner(":")
            .add(tenantKey)
            .add(topicName)
            .add(getRid(record))
            .toString());
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy