These are chat archives for spring-cloud/spring-cloud

22nd
Dec 2016
Alex Liu
@dyancl
Dec 22 2016 13:22
Hi guys, I'm setting up spring cloud stream kafka in my spring boot app that also provides rest API. I came across a strange issue where my first api rest took long time while the subsequent request were processed immediately. Looks like kafka and the rest api is using the same http-nio thread pool. Any idea what's happening behind the scene?
20:03:03.078 [http-nio-8200-exec-10] INFO  c.j.p.s.o.c.a.UserOrderRestController - Received order from user: [user1234], transaction id: [c3159c60-c450-11e6-a98a-8de46a8055b6]
20:03:03.197 [http-nio-8200-exec-10] INFO  o.a.k.c.producer.ProducerConfig - ProducerConfig values: 
    compression.type = none
    metric.reporters = []
    metadata.max.age.ms = 300000
    metadata.fetch.timeout.ms = 60000
    reconnect.backoff.ms = 50
    sasl.kerberos.ticket.renew.window.factor = 0.8
    bootstrap.servers = [192.168.1.22:9092, 192.168.1.29:9092, 192.168.1.30:9092, 192.168.1.31:9092]
    retry.backoff.ms = 100
    sasl.kerberos.kinit.cmd = /usr/bin/kinit
    buffer.memory = 33554432
    timeout.ms = 30000
    key.serializer = class org.apache.kafka.common.serialization.ByteArraySerializer
    sasl.kerberos.service.name = null
    sasl.kerberos.ticket.renew.jitter = 0.05
    ssl.keystore.type = JKS
    ssl.trustmanager.algorithm = PKIX
    block.on.buffer.full = false
    ssl.key.password = null
    max.block.ms = 60000
    sasl.kerberos.min.time.before.relogin = 60000
    connections.max.idle.ms = 540000
    ssl.truststore.password = null
    max.in.flight.requests.per.connection = 5
    metrics.num.samples = 2
    client.id = 
    ssl.endpoint.identification.algorithm = null
    ssl.protocol = TLS
    request.timeout.ms = 30000
    ssl.provider = null
    ssl.enabled.protocols = [TLSv1.2, TLSv1.1, TLSv1]
    acks = 1
    batch.size = 16384
    ssl.keystore.location = null
    receive.buffer.bytes = 32768
    ssl.cipher.suites = null
    ssl.truststore.type = JKS
    security.protocol = PLAINTEXT
    retries = 0
    max.request.size = 1048576
    value.serializer = class org.apache.kafka.common.serialization.ByteArraySerializer
    ssl.truststore.location = null
    ssl.keystore.password = null
    ssl.keymanager.algorithm = SunX509
    metrics.sample.window.ms = 30000
    partitioner.class = class org.apache.kafka.clients.producer.internals.DefaultPartitioner
    send.buffer.bytes = 131072
    linger.ms = 0
20:03:21.214 [http-nio-8200-exec-10] INFO  o.a.kafka.common.utils.AppInfoParser - Kafka version : 0.9.0.1
20:03:21.215 [http-nio-8200-exec-10] INFO  o.a.kafka.common.utils.AppInfoParser - Kafka commitId : 23c69d62a0cabf06
20:03:21.421 [kafka-producer-network-thread | producer-3] WARN  o.apache.kafka.clients.NetworkClient - Error while fetching metadata with correlation id 0 : {OrderTopic=LEADER_NOT_AVAILABLE}
20:03:21.783 [http-nio-8200-exec-10] INFO  c.j.p.s.o.c.s.OrderServiceImpl - Time spent till order [c3159c60-c450-11e6-a98a-8de46a8055b6] submitted to kafka [18705 ms]
20:03:21.784 [http-nio-8200-exec-10] INFO  c.j.p.s.o.c.a.UserOrderRestController - Time spent till order [c3159c60-c450-11e6-a98a-8de46a8055b6] processed [18705 ms]
20:03:27.963 [http-nio-8200-exec-2] INFO  c.j.p.s.o.c.a.UserOrderRestController - Received order from user: [user1234], transaction id: [d1ea9ba0-c450-11e6-a98a-8de46a8055b6]
20:03:27.967 [http-nio-8200-exec-2] INFO  c.j.p.s.o.c.s.OrderServiceImpl - Time spent till order [d1ea9ba0-c450-11e6-a98a-8de46a8055b6] submitted to kafka [4 ms]
20:03:27.967 [http-nio-8200-exec-2] INFO  c.j.p.s.o.c.a.UserOrderRestController - Time spent till order [d1ea9ba0-c450-11e6-a98a-8de46a8055b6] processed [4 ms]
20:03:30.048 [http-nio-8200-exec-1] INFO  o.a.kafka.common.utils.AppInfoParser - Kafka version : 0.9.0.1
Spencer Gibb
@spencergibb
Dec 22 2016 13:28
There is now a room for stream
Alex Liu
@dyancl
Dec 22 2016 13:38
Thanks @spencergibb