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

GH-3617 : Value parameters in ReactiveKafkaProducerTemplate should be nullable #3651

Merged
merged 3 commits into from
Dec 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
import org.springframework.kafka.support.KafkaHeaders;
import org.springframework.kafka.support.converter.MessagingMessageConverter;
import org.springframework.kafka.support.converter.RecordMessageConverter;
import org.springframework.lang.Nullable;
import org.springframework.messaging.Message;
import org.springframework.util.Assert;

Expand All @@ -51,6 +52,7 @@
*
* @author Mark Norkin
* @author Adrian Chlebosz
* @author Juhyun Kim
*
* @since 2.3.0
*/
Expand Down Expand Up @@ -92,19 +94,19 @@ public <T> Mono<SenderResult<T>> sendTransactionally(SenderRecord<K, V, T> recor
return sendTransactionally.single();
}

public Mono<SenderResult<Void>> send(String topic, V value) {
public Mono<SenderResult<Void>> send(String topic, @Nullable V value) {
return send(new ProducerRecord<>(topic, value));
}

public Mono<SenderResult<Void>> send(String topic, K key, V value) {
public Mono<SenderResult<Void>> send(String topic, K key, @Nullable V value) {
return send(new ProducerRecord<>(topic, key, value));
}

public Mono<SenderResult<Void>> send(String topic, int partition, K key, V value) {
public Mono<SenderResult<Void>> send(String topic, int partition, K key, @Nullable V value) {
return send(new ProducerRecord<>(topic, partition, key, value));
}

public Mono<SenderResult<Void>> send(String topic, int partition, long timestamp, K key, V value) {
public Mono<SenderResult<Void>> send(String topic, int partition, long timestamp, K key, @Nullable V value) {
return send(new ProducerRecord<>(topic, partition, timestamp, key, value));
}

Expand Down
Loading