com.github.lontime.extredisson.configuration.ConsumerOption Maven / Gradle / Ivy
The newest version!
package com.github.lontime.extredisson.configuration;
import java.time.Duration;
import com.github.lontime.extredisson.common.Constants;
import com.github.lontime.extredisson.common.ListenerKind;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import com.github.lontime.shaded.org.redisson.api.StreamMessageId;
/**
* ConsumerOption.
* @author lontime
* @since 1.0
*/
@Getter
@Setter
@ToString
public class ConsumerOption {
/**
* name.
*/
private String name;
// /**
// * groupName.
// */
// private String groupName;
/**
* kind.
*/
private ListenerKind kind = ListenerKind.STREAM;
/**
* prefix.
*/
private Boolean prefix = Boolean.TRUE;
/**
* topic.
*/
private String topic;
/**
* topic.
*/
private String next;
/**
* > Read all new arriving elements with ids greater than the last one consumed by the consumer group.
* $ Read from the latest offset
* 0 Read from the start offset
* @return
*/
private StreamMessageId messageId;
/**
* timeout.
*/
private Duration timeout;
/**
* batchSize.
*/
private Integer batchSize = 20;
/**
* initLatestSize.
*/
private Integer initLatestSize = 1;
/**
* listener/serviceName.
*/
private String listener;
/**
* interval.
*/
private Duration interval = Duration.ofMillis(600);
/**
* heartBeat.
*/
private Duration heartbeatInterval = Duration.ofSeconds(5);
/**
* enable clean.
*/
private Boolean enableClean = Boolean.FALSE;
/**
* cleanInterval.
*/
private Duration localCleanInterval = Duration.ofMinutes(2);
/**
* cleanInterval.
*/
private Duration cleanInterval = Duration.ofMinutes(15);
/**
* warmup.
*/
private Duration warmup = Duration.ZERO;
/**
* GroupName.
*/
private String groupName = Constants.STREAM_DEFAULT_GROUP;
/**
* GroupName.
*/
private Boolean groupNoAck = Boolean.FALSE;
/**
* lazyListener.
*/
private Boolean lazyListener = Boolean.FALSE;
/**
* tag.
*/
private String tag;
/**
* ack.
*/
private Boolean ref = Boolean.FALSE;
/**
* broadcast.
*/
private Boolean broadcast = Boolean.FALSE;
/**
* disable read group.
*/
private Boolean disableGroup = Boolean.FALSE;
/**
* maxLen.
*/
private Integer maxLen = 200000;
/**
* maxLenRate.
*/
private Double maxLenRate = 1.5d;
}