I am not seeing the kafka consumer/producer metrics using actuator /actuator/metrics. Only basic jvm metrics is shown.
{
"names": [
"jvm.buffer.memory.used",
"jvm.threads.states",
"jvm.memory.committed",
"spring.integration.channels",
"process.uptime",
"jvm.memory.used",
"jvm.gc.pause",
"logback.events",
"http.server.requests",
"jvm.memory.max",
"tomcat.sessions.active.current",
"jvm.buffer.total.capacity",
"system.cpu.usage",
"jvm.threads.live",
"jvm.classes.unloaded",
"jvm.classes.loaded",
"jvm.threads.peak",
"tomcat.sessions.rejected",
"tomcat.sessions.alive.max",
"jvm.gc.memory.promoted",
"jvm.buffer.count",
"jvm.gc.memory.allocated",
"tomcat.sessions.expired",
"tomcat.sessions.created",
"jvm.gc.max.data.size",
"system.cpu.count",
"spring.integration.handlers",
"spring.integration.sources",
"process.start.time",
"jvm.threads.daemon",
"tomcat.sessions.active.max",
"jvm.gc.live.data.size",
"process.cpu.usage"
]
}
My application is working fine and binding looks ok too and visible in /actuator/bindings.
[
{
"bindingName": "send-kafka-out",
"name": "test.topic",
"group": null,
"pausable": false,
"state": "running",
"extendedInfo": {
"bindingDestination": "test.topic",
"ExtendedProducerProperties": {
"autoStartup": true,
"partitionCount": 1,
"headerMode": "headers",
"extension": {
"bufferSize": 16384,
"compressionType": "none",
"sync": false,
"sendTimeoutExpression": null,
"batchTimeout": 0,
"messageKeyExpression": null,
"headerPatterns": null,
"configuration": {},
"topic": {
"replicationFactor": null,
"replicasAssignments": {},
"properties": {}
},
"useTopicHeader": false,
"recordMetadataChannel": null
},
"validPartitionSelectorProperty": true,
"validPartitionKeyProperty": true
}
},
"input": false
}
]
Below is my stream configuration
public interface KafkaStreams {
String OUTPUT = "send-kafka-out";
@Output(OUTPUT)
MessageChannel getOutboundMessageChannel();
}
@SpringBootApplication
@EnableDiscoveryClient
@EnableJms
@EnableBinding(KafkaStreams.class)
@ComponentScan("com.test.connector.*")
public class ConnectorApplication {
public static void main(String[] args) {
SpringApplication.run(ConnectorApplication.class, args);
}
}
Below is my config.yml
spring:
jms:
listener:
auto-startup: true
acknowledge-mode: AUTO
max-concurrency: 10
concurrency: 10
cloud:
stream:
default-binder: kafka-default
function:
definition:
kafka:
binder:
brokers:
- localhost:9092
configuration:
default.key.serde: org.apache.kafka.common.serialization.Serdes$StringSerde
default.value.serde: org.apache.kafka.common.serialization.Serdes$BytesSerde
commit.interval.ms: 1000
#security:
# protocol: SASL_PLAINTEXT
bindings:
send-kafka-out:
destination: test.topic
contentType: text/plain
group: output-group-1
binder: kafka-default
producer:
header-mode: headers
binders:
kafka-default:
type: kafka
environment:
spring:
cloud:
stream:
kafka:
binder:
brokers: localhost:9092
I am using SpringBoot 2.2.2.RELEASE, SpringCloud Hoxton.SR4 and spring-cloud-stream-binder-kafka 3.0.4.RELEASE. Any pointers about what am i missing would help.