This only applies to the legacy fetch mechanism which is deprecated. This interface will be removed in a future release.
@Deprecated public interface FetchPolicyConfig extends Config
This is use to configure fetch behavior for a specific connector.
It is specifically used to configure fetch batching policy. As fetch requests from clients can specify a selection of topics, sometimes the number of Topics retrieved could be large. This could result is a very large number of fetch reply messages being queued for a client at one time, possibly causing the client queue to fill. This policy allows the user to specify that replies to a single fetch request should be sent to a client in periodic batches, allowing the client time to process the messages and mitigate the possibility of the client queue filling up.
Values may be changed at any time.
Modifier and Type | Method and Description |
---|---|
int |
getBatchSize()
Deprecated.
Returns the batch size value.
|
long |
getDelay()
Deprecated.
Gets the batch delay interval.
|
void |
setBatchSize(int batchSize)
Deprecated.
Sets the batch size value.
|
void |
setDelay(long delay)
Deprecated.
Sets the batch delay value.
|
void setBatchSize(int batchSize) throws ConfigException
Setting a non zero value for this property indicates that fetch replies to a single client's fetch request should be sent in batches no larger than this size. A value of zero indicates that no batching should occur.
By default this value is zero, meaning that no batching should occur.
batchSize
- the maximum number of fetch messages to send to a client
in a single batch. If this is set to 0, no batching will occur.ConfigException
- if unable to set propertyint getBatchSize()
void setDelay(long delay) throws ConfigException
This is used when a non zero batch size is specified and indicates the amount of time (in milliseconds) between sending batches of fetch replies.
If a non zero batch size is specified, this must be specified otherwise batching will still not occur.
delay
- the interval between sending batches of fetch replies in
milliseconds.ConfigException
- if unable to set propertylong getDelay()
Copyright © 2020 Push Technology Ltd. All Rights Reserved.