Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Producer blocks on Send when Schema fails to Encode #763

Closed
samuelhewitt opened this issue Apr 20, 2022 · 0 comments · Fixed by #762
Closed

[Bug] Producer blocks on Send when Schema fails to Encode #763

samuelhewitt opened this issue Apr 20, 2022 · 0 comments · Fixed by #762

Comments

@samuelhewitt
Copy link
Contributor

Expected behavior

When calling producer.Send() and producer.SendAsync(), the relevant error should be returned when the ProducerMessage.Value cannot be encoded by the schema. The publish Semaphore should also be released.

Actual behavior

Send never returns and SendAsync never executes the callback. Additionally, the publish Semaphore is never released.

Steps to reproduce

Execute code similar to the following, observe that Send never returns.

	// create producer
	producer, err := client.CreateProducer(ProducerOptions{
		Topic:  topic,
		Schema: NewAvroSchema("{\"type\":\"string\"}", nil),
	})
	defer producer.Close()

	// producer should send return an error as message is Int64, but schema is String
	mid, err := producer.Send(ctx, &ProducerMessage{
		Value: int64(1),
	})

System configuration

Pulsar client version: v0.8.0
Pulsar version: 2.10.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant