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

com.liguanqiao.grow.delay.rabbitmq.util.DelayTaskMessagePropertiesUtil Maven / Gradle / Ivy

There is a newer version: 0.2.1
Show newest version
package com.liguanqiao.grow.delay.rabbitmq.util;

import lombok.experimental.UtilityClass;
import org.springframework.amqp.core.MessageProperties;

/**
 * MessagePropertiesUtil
 *
 * @author liguanqiao
 * @since 2023/4/14
 **/
@UtilityClass
public class DelayTaskMessagePropertiesUtil {

    private static final String HEADER_RETRY = "grow-retry";

    public static void setRetry(MessageProperties properties, int retry) {
        properties.setHeader(HEADER_RETRY, retry);
    }

    public static Integer getRetry(MessageProperties properties) {
        return properties.getHeader(HEADER_RETRY);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy