-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-2852: support fixed transaction id suffix
add properties `maxCache` at `DefaultKafkaProducerFactory`, setting `maxCache` greater than zero can reuse `transactional.id`. Resolves #2852
- Loading branch information
Zhiyang.Wang1
committed
Nov 23, 2023
1 parent
1a18d28
commit d30de4e
Showing
9 changed files
with
472 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
spring-kafka/src/main/java/org/springframework/kafka/core/NoProducerAvailableException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright 2023-2023 the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.springframework.kafka.core; | ||
|
||
import org.springframework.lang.Nullable; | ||
|
||
/** | ||
* An exception thrown by no transaction producer available exception, when set | ||
* {@link DefaultKafkaProducerFactory} maxCache greater than 0. | ||
* | ||
* @author Wang Zhiyang | ||
* @since 3.1.1 | ||
* | ||
*/ | ||
public class NoProducerAvailableException extends RuntimeException { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
/** | ||
* Constructs a new no producer available exception with the specified detail message and cause. | ||
* @param message the message. | ||
*/ | ||
public NoProducerAvailableException(String message) { | ||
this(message, null); | ||
} | ||
|
||
/** | ||
* Constructs a new no producer available exception with the specified detail message and cause. | ||
* @param message the message. | ||
* @param cause the cause. | ||
*/ | ||
public NoProducerAvailableException(String message, @Nullable Throwable cause) { | ||
super(message, cause); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.