You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When subscribing to a kafka topic that have avro messages published I expect to subscribe to the topic and receive messages of the type I had published.
My code to test subscribing to the avro messages is here.
@Topic(name = "testkafkatopic2", pubsubName = "eventmessaging")
@PostMapping(path = "/eventmessaging", consumes = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity myTopicSubscriber(@requestbody(required = true) MembershipRequest eventData) {
System.out.println(eventData);
return ResponseEntity.ok().build();
}
Actual Behavior
What is happening is the subscriber fails to process the kafka message with the below error.
In what area(s)?
What version of Dapr?
Expected Behavior
When subscribing to a kafka topic that have avro messages published I expect to subscribe to the topic and receive messages of the type I had published.
My code to test subscribing to the avro messages is here.
@Topic(name = "testkafkatopic2", pubsubName = "eventmessaging")
@PostMapping(path = "/eventmessaging", consumes = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity myTopicSubscriber(@requestbody(required = true) MembershipRequest eventData) {
System.out.println(eventData);
return ResponseEntity.ok().build();
}
Actual Behavior
What is happening is the subscriber fails to process the kafka message with the below error.
ERRO[0149] Error processing Kafka message: testkafkatopic2/0/20 [key=]. Error: fails to send binding event to http app channel, status code: 400 body: {"timestamp":"2024-04-12T16:4
3:05.734+00:00","status":400,"error":"Bad Request","path":"/eventmessaging"}. app_id=loyaltycoapi-sub component="eventmessaging (bindings.kafka/v1)" instance=IW-5CG3102693 scope=d
apr.contrib type=log ver=1.13.2
Steps to Reproduce the Problem
Publish a message to kafka with avro serialization.
Subscribe to the topic.
Here is my component binding file for your reference as well.
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: eventmessaging
spec:
type: bindings.kafka
version: v1
metadata:
# Kafka broker connection setting
- name: brokers
value: localhost:19092
# consumer configuration: topic and consumer group
- name: topics
value: testkafkatopic2
- name: consumerGroup
value: group1
# publisher configuration: topic
- name: publishTopic
value: testkafkatopic2
- name: authRequired
value: false
- name: direction
value: "input, output"
- name: schemaRegistryURL # Optional. When using Schema Registry Avro serialization/deserialization. The Schema Registry URL.
value: http://localhost:8081
Release Note
RELEASE NOTE: FIX Bug in runtime.
The text was updated successfully, but these errors were encountered: