Commit Graph

68 Commits

Author SHA1 Message Date
bamboo
450350f995 [artifactory-release] Next development version 2016-04-26 22:35:07 +00:00
bamboo
f11414230f [artifactory-release] Release version 1.0.0.RC3 2016-04-26 22:35:07 +00:00
Ilayaperumal Gopinathan
ca101ba9e9 Use commons-logging
This resolves #490
2016-04-18 10:56:32 -04:00
Ilayaperumal Gopinathan
c815420305 Cleanup todo items
This resolves #485
2016-04-15 15:08:53 -04:00
Marius Bogoevici
147a0cb0bc Add checkstyle support
Fixes #481

Execute checkstyle validation at build time.
Add minimal set of rules.
Ensure that existing code conforms to the rules.
2016-04-15 10:44:37 +05:30
bamboo
f9330f1117 [artifactory-release] Next development version 2016-04-07 13:25:26 +00:00
bamboo
727434b732 [artifactory-release] Release version 1.0.0.RC2 2016-04-07 13:25:26 +00:00
Ilayaperumal Gopinathan
1730021547 Add basic validation for producer/consumer properties
This resolves #425

Address review comments

 - Update AssertTrue conditional logic
 - Modify the message

Changes after rebase

 - Changes after extendedProperties addition
2016-04-04 20:39:43 -04:00
Ilayaperumal Gopinathan
853e340a35 Remove unused Rabbit binder properties 2016-03-30 14:36:50 +05:30
Marius Bogoevici
ba371ab67a Eliminate Duplicate RabbitMQ Configuration Options
Fixes #447

Some Rabbit MQ configuration properties duplicate options already found in Spring Boot.
2016-03-24 14:12:18 -04:00
Ilayaperumal Gopinathan
6a125b601b Remove ConnectionFactorySettings configuration class
This resolves #386
2016-03-24 10:38:45 -04:00
bamboo
a9e432645d [artifactory-release] Next development version 2016-03-22 01:27:46 +00:00
bamboo
70a6abbc61 [artifactory-release] Release version 1.0.0.RC1 2016-03-22 01:27:46 +00:00
Marius Bogoevici
f681e2ce91 Setting version to 1.0.0.BUILD-SNAPSHOT 2016-03-21 21:11:25 -04:00
bamboo
98de668170 [artifactory-release] Next development version 2016-03-22 00:44:17 +00:00
bamboo
13daf68697 [artifactory-release] Release version 1.0.0.RC1 2016-03-22 00:44:17 +00:00
Marius Bogoevici
cadfd48a1f Adds support for extended binding properties
* Add parameterized ExtendedConsumerProperties and ExtendedProducerProperties;
* Added ExtendedPropertiesBinder with the ability of managing per-binding property extensions and interacting the core service;
* Add extensions for Kafka and Rabbit

Addressing PR comments

Changed binder-specific binding prefix to `spring.cloud.stream.binderType.bindings`

Removing kafka-binder.properties
2016-03-21 18:00:35 -04:00
Gary Russell
fa035296f2 GH-439: Add 'transacted' to Rabbit Producer Props
Fixes #439
Resolves #401
2016-03-17 18:01:35 -04:00
Marius Bogoevici
af733faf18 Correct Rabbit defaults for headers 2016-03-17 01:58:45 -04:00
Marius Bogoevici
9b0c4bd627 Typesafe consumer and producer configurations
- Change the Binder interface to support ConsumerProperties/ProducerProperties beans and subclasses
- Binders can subclass the property beans to add new supported properties that will be automatically populated
- Spring Cloud Stream will  infer the target type and populate the beans from the environment based on a `spring.cloud.stream.bindings..<bindingName>` prefix
- Remove binder defaults and retain only general binder configurations

TODO: a) decide on instanceIndex/partitionIndex alignment (we do not need both)
b) support `defaultProducer`/`defaultConsumer` properties
c) add leniency control on binding (fail/ignore for unknown properties)
d) add a `requiredProperties` configuration for consumer/producer properties to finely tune the mandatory properties expected to be supported by a bound application

Changes made during review:

- Add support for consumer and producer defaults
- Remove partitionIndex, keeping only instanceIndex
- Fix default properties for Kafka binder
- Move batching properties to Rabbit only
2016-03-15 15:38:30 -04:00
Ilayaperumal Gopinathan
6acb825ad5 Remove XD references in SCSt code base 2016-03-04 15:04:53 -05:00
Mark Fisher
2bc59a184a AbstractBinder's afterPropertiesSet() is now final
- subclasses should implement the new onInit() method instead of overriding
- avoids the potential for a NPE in case an overriding subclass did not call the superclass method
2016-03-02 13:29:49 -05:00
Ilayaperumal Gopinathan
4dfd217db6 Maven configuration simplification
- Move kafka related dependencies from parent `dependencyManagement` to `kafka` binder project
 - Remove duplicate properties
 - Fix typo

This resolves #353
2016-02-25 12:44:27 -05:00
Patrick Peralta
d34aafb87b Partition handling refactoring
Moved partition calculation from AbstractBinder to
its own class PartitionHandler.

Updated per review feedback

Refactored bean creation
Added synchronization around bean creation
2016-02-24 16:42:51 -05:00
Marius Bogoevici
2fa9cda89c Durability Configuration and Default Groups
Resolves #317

Remove the `durable` binder configuration property
Make subscriber groups durable by default
Introduce `requiredGroups` property
Kafka groups (non-anonymous) now start by default at EARLIEST, which is more appropriate for new stream consumers

Addressing PR comments
2016-02-22 17:33:18 -05:00
Marius Bogoevici
6c880726b8 Binder API simplification
Resolves #330

- removes `unbind` from the binder and moves it to the `Binding` instance itself;
- `Binding` is now an interface with a default implementation provided by SCS
- Removed all methods from Binder except for unbind()
- Removed old and unused code
- Removed circular reference between default Binder and Binding implementations
- Removed Binder type
2016-02-22 14:21:03 -05:00
bamboo
0a6fc90f3a [artifactory-release] Next development version 2016-02-04 19:38:45 +00:00
bamboo
082e5e7330 [artifactory-release] Release version 1.0.0.M4 2016-02-04 19:38:44 +00:00
Mark Fisher
7ffe9070e3 removed more lattice references 2016-02-04 08:55:07 -05:00
Marius Bogoevici
7477fcbee9 Add health indicators infrastructure
- Adds a generic 'bindersHealthIndicator' bean controlled by `management.health.binders.enabled` that tallies results from binders
- Binders are expected to expose one or more health indicators based on the status of the middleware connection. If no health indicators are exposed, the status is deemed to be 'UNKNOWN'
- Add support for Redis and Rabbit based on existing health indicators

Moved binder health indicator to autoconfiguration

Also updated copyright
2016-02-02 22:15:33 +05:30
Gary Russell
e2485e3290 Clean Up Auto-Declare Context on Unbind 2016-01-27 22:00:08 -05:00
Marius Bogoevici
192aa79baa Remove default groups, support default pubsub with empty group
Addressing PR comments
2016-01-27 21:59:58 -05:00
Mark Fisher
c3758b9dc0 Binder simplification
* removed pub/sub methods from binder
* consumer group is now a parameter of the remaining bindConsumer method

* remove DynamicProducer from Binder
* Move logic to create the dynamic channel to the channel resolver.
* Return bindings from bind methods and use them for unbinding
* Suffix for dlq

Move All Rabbit Binder CleanUp to Test Bindera

More RabbitMQ Binder Test Cleanup

Clean up declarations for remaining tests.

removed BinderUtils

use Redis ZSET for consumer groups

copyright dates

AutoBindDLQ: Single DLQ Per Group When Partitioned

Configure a single DLQ for each group for all partitions.

Add DLX Exchange binding for each original queue routing key, including the partition.

Fix DLQ Binding (Producer Side)

Option was not allowed and the routing key was wrong.

Add test to verify producers can be bound before consumers.

`autoBindDLQ` must be set (or reset) on both sides for success.
2016-01-27 21:59:58 -05:00
Ilayaperumal Gopinathan
e792b0e347 Use LocalizedQueueConnectionFactory from Spring AMQP
- Remove LocalizedQueueConnectionFactory and the unit tests
   - The unit tests are already covered in Spring AMQP and also, certain methods accessors require public access to run tests from SCS
 - Kept the integration tests as is (though this can be removed as well - it is also covered in Spring AMQP)

This resolves #279
2016-01-19 09:22:53 -05:00
Ilayaperumal Gopinathan
fa89e5bcb6 Handle binder config in BindingProperties
- Per-binding properties defined in `BindingProperties` need to hold the binder specific configurations needed when binding producer/consumers.
Previously, these were added in `ChannelBindingServiceProperties` as producer/consumer properties. Since these configuration properties are for
per-binding based on the input/output (consumer/producer) channel being bound it is better to move these properties into `BindingProperties`.
 - Add some of the supported producer/consumer properties into BindingProperties

- This fixes #256

Rename CommonBinderProperties -> BinderPropertyKeys

Rename class AbstractBinderPropertiesAccessor.java -> AbstractBindingPropertiesAccessor.java
2015-12-30 14:08:56 -05:00
bamboo
b869cb8c4b [artifactory-release] Next development version 2015-12-21 17:18:25 +00:00
bamboo
f3d46fc120 [artifactory-release] Release version 1.0.0.M3 2015-12-21 17:18:25 +00:00
Gary Russell
7ee5df4033 RabbitMQ Cleanup (New Tests).
Simple polishing.
2015-12-18 22:24:12 -05:00
Eric Bottard
286ba44ff1 Remove TODOs 2015-12-18 16:44:08 +01:00
Marius Bogoevici
a4f97b364e Binders with default settings inherit from module's configuration
Resolve #229

* Optimizes connection factory creation for binders that can use Boot's autoconfiguration
* Make binder contexts a child of main context when creating a Binder with default configuration settings
* Inherit environment from main context when the Binder context is not a child, and make that optional
* Default environment inheritance to true
* Tests
2015-12-17 11:51:10 -05:00
Marius Bogoevici
bf178360ee Remove autoconfig
Ensure that the autoconfig and the cloud config don't overlap

Removed SeedConfiguration
2015-12-10 13:35:26 -05:00
Marius Bogoevici
96f96f7621 Initial implementation of multibinder support
- Addresses #138,#172,#173 with support for multiple binders in an application
- Binders can be of multiple types (e.g. Rabbit or Kafka), as well as multiple binders of the same type connecting to different system (e.g. multiple Rabbit binders connecting to different Rabbit clusters)
- Binders are now created in a separate context, allowing for multiple configurations
- Adds the `spring.cloud.spring.binders` namespace that allows for creating configuration properties for multiple binders
- Add support for default binder, modify Kafka tests to use multiple brokers when running embedded
2015-12-09 11:08:04 -05:00
Marius Bogoevici
bcff75b20b GH-213 Merge Binder SPI into Core
- Moved contents of `spring-cloud-stream-binder-spi` into `spring-cloud-stream`
- Removed `spring-cloud-stream-binder-local` and used local binder implementation for tests exclusively
2015-11-30 17:28:24 -05:00
Gary Russell
6f1f246dfb GH-211: PubSub Group Default to Random UUID
Resolves #211

Add a default UUID to the `BindingProperties.group` so a pubsub binding is
unique unless the group is specifically set.
2015-11-30 13:32:31 -05:00
Marius Bogoevici
770047871b Moved Rabbit management outside with the Rabbit bus 2015-11-19 17:15:02 -05:00
Gary Russell
d3c87daf64 GH-203: Support Late Binding with RabbitMQ
If the broker was down, the binding failed. Defer the queue/exchange/binding declarations
until the broker is available (already supported by `RabbitAdmin`.

Solves spring-cloud/spring-cloud-stream#203

Fix PubSub, Test

- Too many binder prefixes on pub sub queue name.
- Mismatched queue args in test case.
2015-11-19 10:28:58 -05:00
Gary Russell
a375e61260 XD-3519: Rabbit Taps
- instead of publishing to the default exchange, producers now publish to a topic exchange, to which the main queue is bound
- taps on a stream simply bind a queue to the same exchange with a name including the group for the tapping stream and a
    routing key pattern `#`
 - this means that multiple instances of the same tap stream will compete but multiple tap streams will get a copy
- for partitioned data, a single topic exchange is used, which each partition queue bound with its name as the routing key
 - this means taps on partitioned data see the consolidated messages

Remove unused binder utilities.

Use TopicExchange Always

Use a TopicExchange when binding a pubSub producer for consistency.

Remove Deprecated Binder Method

Add group to BindingProperties

- also fix artifact name in test support pom
- also fix some kafka tests (does not imply that kafka taps work - yet)
2015-11-10 20:25:49 -05:00
Artem Bilan
2e7f9cc729 GH-166: Fix ChannelBinder config inconsistency
Fixes GH-166 (https://github.com/spring-cloud/spring-cloud-stream/issues/166)

Since `onInit()` in the `MessageChannelBinderSupport` was called before the `evaluationContext` population,
the `RedisMessageChannelBinder#errorAdapter` caused `NPE` for its `evaluationContext`.

* Change the initialization order
* Use `ExpressionUtils` to populate `evaluationContext` - creates `StandardEvaluationContext` if there is no one in the `applicationContext`
* Add more initializations for the `RedisMessageChannelBinder#errorAdapter`
* Remove explicit `evaluationContext` population from the `AbstractTestBinder` to rely on the fix for this ticket
* Some other simple polishing

Address PR comments
2015-10-29 16:41:34 -04:00
bamboo
7dc9f2e324 [artifactory-release] Next development version 2015-10-23 19:34:46 +00:00
bamboo
bd22e119c8 [artifactory-release] Release version 1.0.0.M2 2015-10-23 19:34:44 +00:00