long-polling


Kafka long polling


I'm looking at kafka to implement a low-latency message queue, and I've been reading up about consumer long polling. However, there are no examples about how to actually use long polling, or what options you need to set to enable it. How do you enable long polling using the kafka java api?
You don't have to enable it per say since it is the default behavior of the kafka consumer. What you need to set in your configuration is fetch.wait.max.ms.
Two values are important to achieve what you want:
fetch.min.bytes: The broker will wait for this amount of data to fill BEFORE it sends the response to the consumer client.
fetch.wait.max.ms: The broker will wait for this amount of time BEFORE sending a response to the consumer client, unless it has enough data to fill the response (fetch.message.max.bytes)
Look for more configuration options in Kafka Consumer Configs
The kafka user mailing list is a also good option for questions like this.

Related Links

Koa 2 router how to make a long poll request
Confluent long polling properties in kafka-rest
How to combine async and blocking requests in VuGen?
Long polling confusion
WAS Liberty & Atmosphere long-polling 1 min delay
Long Polling interval in atmosphere
MQTT long polling over GPRS/HSDPA
JS and CSS file fails to load when the page is refreshed in grails application which uses Atmosphere Meteor plugin
Security concerns in long polling
Kafka long polling
How to build the request for a long poll url for box.com
how to access enterprise events using Java code
Handle client timeouts when serving long polling with gevent
Long polling blocking multiple windows?
Long polling on a penny auction site?
Cannot implement long polling

Categories

HOME
java
coq
cookies
google-play
office365api
vmware
adb
getelementsbytagname
spring-jdbc
yarn
packages
jpeg
onelogin
node-notifier
webrequest
cloudkit
maude-system
imacros
task
phaser
designer
try-catch
http-status-code-504
undefined
connection-string
dbext
visjs
one-hot-encoding
django-storage
phpfox
gitignore
twilio-api
jspresso
framemaker
android-kernel
geopositioning
hexo
ios5
sqlite2
user-controls
g-code
quadratic-programming
http-live-streaming
angular2-meteor
outlook-2013
termination
upstart
togetherjs
tropo
namecoin
lync-client-sdk
minimization
watchconnectivity
jquery-filter
firmata
nsfilemanager
autorest
gstreamer-0.10
lttng
packagist
captivenetwork
system.management
cloudbees
uid
separator
teamcity-8.0
muse
php-ci
apache-commons-fileupload
sniffer
dereference
website-monitoring
oxwall
jsonpickle
device-manager
tld
p4java
html5-notifications
pyhdf
page-layout
coverflow
excel-2003
cos
shellexecute
mylyn
pushbackinputstream
smtp-auth
trusted
dice
multipage
armcc
windows-phone-7.1.1
amazon-appstore
nsdatecomponents
hamachi
xtype
blitz++
sortable-tables
gamequery
nintendo-ds
exchange-server-2003
mtj
geneva-server
3gp

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile