Polish
This commit is contained in:
@@ -89,7 +89,7 @@ public class KafkaAdmin implements ApplicationContextAware, SmartInitializingSin
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the close timeout in seconds. Defaults to 10 seconds.
|
||||
* Set the close timeout in seconds. Defaults to {@value #DEFAULT_CLOSE_TIMEOUT} seconds.
|
||||
* @param closeTimeout the timeout.
|
||||
*/
|
||||
public void setCloseTimeout(int closeTimeout) {
|
||||
@@ -97,7 +97,7 @@ public class KafkaAdmin implements ApplicationContextAware, SmartInitializingSin
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the operation timeout in seconds. Defaults to 30 seconds.
|
||||
* Set the operation timeout in seconds. Defaults to {@value #DEFAULT_OPERATION_TIMEOUT} seconds.
|
||||
* @param operationTimeout the timeout.
|
||||
*/
|
||||
public void setOperationTimeout(int operationTimeout) {
|
||||
@@ -250,7 +250,7 @@ public class KafkaAdmin implements ApplicationContextAware, SmartInitializingSin
|
||||
logger.error("Interrupted while waiting for partition creation results", e);
|
||||
}
|
||||
catch (TimeoutException e) {
|
||||
throw new KafkaException("Timed out waiting for create topics results", e);
|
||||
throw new KafkaException("Timed out waiting for create partitions results", e);
|
||||
}
|
||||
catch (ExecutionException e) {
|
||||
logger.error("Failed to create partitions", e.getCause());
|
||||
|
||||
@@ -86,7 +86,7 @@ public class StreamsBuilderFactoryBean extends AbstractFactoryBean<StreamsBuilde
|
||||
|
||||
/**
|
||||
* Specify the timeout in seconds for the {@link KafkaStreams#close(long, TimeUnit)} operation.
|
||||
* Defaults to 10 seconds.
|
||||
* Defaults to {@value #DEFAULT_CLOSE_TIMEOUT} seconds.
|
||||
* @param closeTimeout the timeout for close in seconds.
|
||||
* @see KafkaStreams#close(long, TimeUnit)
|
||||
*/
|
||||
|
||||
@@ -87,7 +87,7 @@ public class NonResponsiveConsumerEvent extends KafkaEvent {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ListenerContainerIdleEvent [timeSinceLastPoll="
|
||||
return "NonResponsiveConsumerEvent [timeSinceLastPoll="
|
||||
+ ((float) this.timeSinceLastPoll / 1000) + "s, listenerId=" + this.listenerId
|
||||
+ ", container=" + getSource()
|
||||
+ ", topicPartitions=" + this.topicPartitions + "]";
|
||||
|
||||
@@ -543,7 +543,7 @@ public class KafkaMessageListenerContainerTests {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Test
|
||||
public void testBrokerDownEvent() throws Exception {
|
||||
public void testNonResponsiveConsumerEvent() throws Exception {
|
||||
ConsumerFactory<Integer, String> cf = mock(ConsumerFactory.class);
|
||||
Consumer<Integer, String> consumer = mock(Consumer.class);
|
||||
given(cf.createConsumer(isNull(), isNull())).willReturn(consumer);
|
||||
|
||||
@@ -160,7 +160,7 @@ The `brokerProperties` and `brokerPropertiesLocation` attributes of `@EmbeddedKa
|
||||
"auto.create.topics.enable=${kafka.broker.topics-enable:true}" }
|
||||
brokerPropertiesLocation = "classpath:/broker.properties")
|
||||
----
|
||||
In th example above, the property placeholders `${kafka.broker.logs-dir}` and `${kafka.broker.port}` are resolved from the Spring `Environment`.
|
||||
In the example above, the property placeholders `${kafka.broker.logs-dir}` and `${kafka.broker.port}` are resolved from the Spring `Environment`.
|
||||
In addition the broker properties are loaded from the `broker.properties` classpath resource specified by the `brokerPropertiesLocation`.
|
||||
Property placeholders are resolved for the `brokerPropertiesLocation` URL and for any property placeholders found in the resource.
|
||||
Properties defined by `brokerProperties` override properties found in `brokerPropertiesLocation`.
|
||||
|
||||
Reference in New Issue
Block a user