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
cloud
c#-4.0
plot
read-eval-print-loop
routes
jsp-tags
spring-jdbc
frameworks
twitter-bootstrap-4
installshield
fingerprint
acquia
directx
upload
cloudkit
kibana-4
windows-10-universal
collectd
task
iron-router
decimal
jsprit
django-admin
pugjs
jqwidget
predix
tar
kvc
cultureinfo
trading
opennlp
kannel
traffic
entitlements
applozic
javascriptcore
iframe-resizer
bosh
perlin-noise
hybridauth
rotational-matrices
mapdb
android-ble
io-redirection
hue
unoconv
jsch
gabor-filter
statsd
recursive-datastructures
setter
slickedit
root-framework
url-pattern
nxt
impresspages
bstr
player
contact-list
clang-static-analyzer
ipconfig
tcpserver
security-testing
android-listview
bridge.net
c++03
geonetwork
pick
knuth
internet-connection
xojo
android-radiobutton
elliptic-curve
expected-exception
openlaszlo
prettify
farseer
access-rights
tidy
distutils
hamiltonian-cycle
bitsharp
gdata-api
venn-diagram
armcc
whoosh
gwt-ext
psi
servicehost
netbeans-7.1
disclosure
multi-tier
iweb
swing-app-framework
w3wp
data-acquisition
wsdl.exe

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App