com.aliyun.openservices.ons.api.exactlyonce.ExactlyOnceONSFactoryAPI Maven / Gradle / Ivy
package com.aliyun.openservices.ons.api.exactlyonce;
import java.util.Properties;
import com.aliyun.openservices.shade.com.alibaba.rocketmq.client.retry.RetryStrategy;
import com.aliyun.openservices.ons.api.ONSFactoryAPI;
import com.aliyun.openservices.ons.api.PropertyKeyConst;
public interface ExactlyOnceONSFactoryAPI extends ONSFactoryAPI {
/**
* 根据自定义的属性创建一个支持有且仅有一次消费的{@code OrderConsumer}实例,具体支持的属性详见{@link PropertyKeyConst}
*
* @param properties 构造{@code ExactlyOnceConsumer}实例的属性
* @return {@code ExactlyOnceConsumer}实例,用于订阅Topic进行有且仅有一次消费
*/
ExactlyOnceConsumer createExactlyOnceConsumer(final Properties properties);
/**
* 根据自定义的属性创建一个支持有且仅有一次消费的{@code OrderConsumer}实例,具体支持的属性详见{@link PropertyKeyConst}
*
* @param properties 构造{@code ExactlyOnceConsumer}实例的属性
* @param retryStrategy 构造{@code RetryStrategy}重试策略
* @return {@code ExactlyOnceConsumer}实例,用于订阅Topic进行有且仅有一次消费
*/
ExactlyOnceConsumer createExactlyOnceConsumer(final Properties properties, final RetryStrategy retryStrategy);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy