diff --git a/spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/properties/RabbitCommonProperties.java b/spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/properties/RabbitCommonProperties.java index b44d4f801..1dcc5c425 100644 --- a/spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/properties/RabbitCommonProperties.java +++ b/spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/properties/RabbitCommonProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2017 the original author or authors. + * Copyright 2017-2018 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. @@ -155,12 +155,12 @@ public abstract class RabbitCommonProperties { private String prefix = ""; /** - * True if the queue is provisioned as a lazy queue. + * true if the queue is provisioned as a lazy queue */ private boolean lazy; /** - * True if the DLQ is provisioned as a lazy queue. + * true if the DLQ is provisioned as a lazy queue */ private boolean dlqLazy; diff --git a/spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/properties/RabbitConsumerProperties.java b/spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/properties/RabbitConsumerProperties.java index 45580a287..298ebdf49 100644 --- a/spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/properties/RabbitConsumerProperties.java +++ b/spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/properties/RabbitConsumerProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2017 the original author or authors. + * Copyright 2016-2018 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. @@ -28,37 +28,79 @@ import org.springframework.util.Assert; */ public class RabbitConsumerProperties extends RabbitCommonProperties { + /** + * true to use transacted channels + */ private boolean transacted; + /** + * container acknowledge mode + */ private AcknowledgeMode acknowledgeMode = AcknowledgeMode.AUTO; + /** + * maxumum concurrency of this consumer (threads) + */ private int maxConcurrency = 1; + /** + * number of prefetched messages pre consumer thread + */ private int prefetch = 1; + /** + * messages per acknowledgment (and commit when transacted) + */ private int txSize = 1; + /** + * true for a durable subscription + */ private boolean durableSubscription = true; + /** + * republish failures to the DLQ with diagnostic headers + */ private boolean republishToDlq; + /** + * when republishing to the DLQ, the delivery mode to use + */ private MessageDeliveryMode republishDeliveyMode = MessageDeliveryMode.PERSISTENT; + /** + * true to requeue rejected messages, false to discard (or route to DLQ) + */ private boolean requeueRejected = false; + /** + * patterns to match which headers are mapped (inbound) + */ private String[] headerPatterns = new String[] {"*"}; + /** + * interval between reconnection attempts + */ private long recoveryInterval = 5000; /** - * True if the consumer is exclusive. + * true if the consumer is exclusive */ private boolean exclusive; + /** + * when true, stop the container instead of retrying queue declarations + */ private boolean missingQueuesFatal = false; + /** + * how many times to attempt passive queue declaration + */ private Integer queueDeclarationRetries; + /** + * interval between attempts to passively declare missing queues + */ private Long failedDeclarationRetryInterval; public boolean isTransacted() { diff --git a/spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/properties/RabbitProducerProperties.java b/spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/properties/RabbitProducerProperties.java index 6b2a7e733..a7c1b826a 100644 --- a/spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/properties/RabbitProducerProperties.java +++ b/spring-cloud-stream-binder-rabbit-core/src/main/java/org/springframework/cloud/stream/binder/rabbit/properties/RabbitProducerProperties.java @@ -1,5 +1,5 @@ /* - * Copyright 2016-2017 the original author or authors. + * Copyright 2016-2018 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. @@ -26,29 +26,53 @@ import org.springframework.amqp.core.MessageDeliveryMode; */ public class RabbitProducerProperties extends RabbitCommonProperties { + /** + * true to compress messages + */ private boolean compress; + /** + * true to batch multiple messages into one + */ private boolean batchingEnabled; + /** + * the number of messages to batch, when enabled + */ private int batchSize = 100; + /** + * the size limit for batched messages + */ private int batchBufferLimit = 10000; + /** + * the time after which an incomplete batch will be sent + */ private int batchTimeout = 5000; + /** + * true to use transacted channels + */ private boolean transacted; + /** + * the delivery mode for published messages + */ private MessageDeliveryMode deliveryMode = MessageDeliveryMode.PERSISTENT; + /** + * patterns to match which headers are mapped (inbound) + */ private String[] headerPatterns = new String[] {"*"}; /** - * When using a delayed message exchange, a SpEL expression to determine the delay to apply to messages + * when using a delayed message exchange, a SpEL expression to determine the delay to apply to messages */ private String delayExpression; /** - * A custom routing key when publishing messages; default is the destination name; suffixed by "-partition" when partitioned + * a custom routing key when publishing messages; default is the destination name; suffixed by "-partition" when partitioned */ private String routingKeyExpression;