Browse Source

fmt

pull/7329/head
chrislu 4 weeks ago
parent
commit
bca94e778d
  1. 10
      weed/mq/kafka/protocol/produce.go

10
weed/mq/kafka/protocol/produce.go

@ -149,11 +149,11 @@ func (h *Handler) handleProduceV0V1(ctx context.Context, correlationID uint32, a
// Process the record set
recordCount, _, parseErr := h.parseRecordSet(recordSetData) // totalSize unused
if parseErr != nil {
errorCode = 42 // INVALID_RECORD
} else if recordCount > 0 {
// Use SeaweedMQ integration
offset, err := h.produceToSeaweedMQ(ctx, topicName, int32(partitionID), recordSetData)
if err != nil {
errorCode = 42 // INVALID_RECORD
} else if recordCount > 0 {
// Use SeaweedMQ integration
offset, err := h.produceToSeaweedMQ(ctx, topicName, int32(partitionID), recordSetData)
if err != nil {
// Check if this is a schema validation error and add delay to prevent overloading
if h.isSchemaValidationError(err) {
time.Sleep(200 * time.Millisecond) // Brief delay for schema validation failures

Loading…
Cancel
Save