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

com.aliyun.openservices.ons.api.exactlyonce.ExactlyOnceFactoryImpl Maven / Gradle / Ivy

There is a newer version: 1.9.4.Final
Show newest version
package com.aliyun.openservices.ons.api.exactlyonce;

import java.util.Properties;

import com.aliyun.openservices.shade.com.alibaba.rocketmq.client.retry.DefaultConsumerRetryStrategy;
import com.aliyun.openservices.shade.com.alibaba.rocketmq.client.retry.RetryStrategy;

import com.aliyun.openservices.ons.api.impl.ONSFactoryImpl;
import com.aliyun.openservices.ons.api.impl.rocketmq.ONSUtil;

public class ExactlyOnceFactoryImpl extends ONSFactoryImpl implements ExactlyOnceONSFactoryAPI {
    @Override
    public ExactlyOnceConsumer createExactlyOnceConsumer(Properties properties) {
        return createExactlyOnceConsumer(properties, new DefaultConsumerRetryStrategy());
    }

    @Override
    public ExactlyOnceConsumer createExactlyOnceConsumer(Properties properties,
        RetryStrategy retryStrategy) {
        return new ExactlyOnceConsumerImpl(ONSUtil.extractProperties(properties), retryStrategy);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy