public interface FetchPolicyConfig extends Config
This is use to configure fetch behaviour for a specific connector.
It is specifically used to configure fetch batching policy. As fetch requests from clients can specify a selection of Topics then 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.
This is a server side only configuration item.
Values may be changed at any time.
Modifier and Type | Method and Description |
---|---|
int |
getBatchSize()
Returns the batch size value.
|
long |
getDelay()
Gets the batch delay interval.
|
void |
setBatchSize(int batchSize)
Sets the batch size value.
|
void |
setDelay(long delay)
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 then 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 then 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 © 2016 Push Technology Ltd. All Rights Reserved.