merlimat commented on a change in pull request #10139:
URL: https://github.com/apache/pulsar/pull/10139#discussion_r607223099
##########
File path:
pulsar-client/src/main/java/org/apache/pulsar/client/impl/PulsarClientImpl.java
##########
@@ -931,7 +931,10 @@ public ExecutorService getInternalExecutorService() {
// This method should be exposed in the PulsarClient interface. Only
expose it when all the transaction features
// are completed.
// @Override
- public TransactionBuilder newTransaction() {
+ public TransactionBuilder newTransaction() throws PulsarClientException {
+ if (!conf.isEnableTransaction()) {
+ throw new
PulsarClientException.InvalidConfigurationException("Disable Transaction");
Review comment:
```suggestion
throw new
PulsarClientException.InvalidConfigurationException("Transactions are not
enabled");
```
```suggestion
throw new
PulsarClientException.InvalidConfigurationException("Disable Transaction");
```
##########
File path:
pulsar-client-api/src/main/java/org/apache/pulsar/client/api/PulsarClient.java
##########
@@ -312,7 +312,9 @@ static ClientBuilder builder() {
* @return a {@link TransactionBuilder} object to configure and construct
* the {@link org.apache.pulsar.client.api.transaction.Transaction}
instance
*
+ * @throws PulsarClientException
+ * if disable transaction
Review comment:
```suggestion
* if transactions are not enabled
```
```suggestion
* if disable transaction
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]