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
relative-path
iot
webstorm
adb
twitter-bootstrap-4
packages
jpeg
cross-browser
serverspec
upload
webrequest
adobe-analytics
dax
moonmail
decomposition
jsprit
pythonanywhere
oxyplot
scichart
jtextfield
orleans
mps
mmap
php-openssl
pepper
su
selectedindexchanged
user-interaction
phpfox
skia
fabric8
frame
nameservers
ghost4j
swisscomdev
retina-display
unspecified
webix-treetable
ibpy
nomethoderror
midl
turbogears
cubic-spline
flickr-api
revapi
worksheet
yii2-extension
mplayer
windows-mobile-6.5
pillow
crosswalk-runtime
jquery-filter
ctest
player
fputcsv
rhino-servicebus
revolution-r
cloudbees
freelancer.com-api
ios8-today-widget
intel-fortran
cartesian-product
collapse
wireshark-dissector
method-parameters
nsight
iiviewdeckcontroller
typekit
coldbox
android-nested-fragment
android-imagebutton
codeigniter-routing
titanium-modules
gulp-less
xojo
castle
srs
oam
dexterity
free-variable
e4x
cisco-jtapi
bluepill
runas
netbeans-6.9
adk
pydot
horizontal-accordion
mongomapper
forums
kdbg
ti-dsp
virtual-functions
nerddinner
spec#
zune
paul-graham

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App