Skip to content

Improve Kafka Reply Topic Logic in the KafkaProducerMessageHandler #3616

@garyrussell

Description

@garyrussell

Currently:

		if (replyTopic == null) {
			if (this.replyTopicsAndPartitions.size() == 1) {
				replyTopic = getSingleReplyTopic();
			}
			else {
				throw new IllegalStateException("No reply topic header and no default reply topic can be determined");
			}
		}

However, the ReplyingKafkaTemplate could have already determined a default reply topic - this will need a change to the template to expose its default (if present).

The current mechanism (determineValidReplyTopicsAndPartitions()) does not work because the partition might not have yet been assigned.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions