Commit Graph

143 Commits

Author SHA1 Message Date
Marius Bogoevici
aef08a28a3 Move tests to AssertJ 2016-06-01 13:10:42 -04:00
Marius Bogoevici
1f3661f4c4 Fix race condition in testDefaultAutoCommitOnErrorWithDlq 2016-05-29 08:51:28 -04:00
Marius Bogoevici
e2f91417c3 Add setting for autoCommitOnError
Fixes #542

- add option for `autoCommitOnError`
- make `autoCommitOnError` follow the state of `enableDlq` - no need to suppress commits if messages will be sent elsewhere
2016-05-28 11:08:31 -04:00
Marius Bogoevici
51a451300a Use KafkaBinderConfigurationProperties directly
Fixes #548

- Remove redundant property copying
- Make `socketBufferSize` configurable (it wasn't provided as a configuration option)
2016-05-25 17:59:19 -04:00
Marius Bogoevici
1d0031d356 Use CustomizableThreadFactory for Kafka Binder
Fixes #543

We don't need another ThreadFactory implementation and can use Spring Framework class instead.
2016-05-17 15:03:46 -04:00
Marius Bogoevici
18dc0a707d Implement remainder of Spring Boot Checkstyle code rules
Fixes #532

Implements most of the remaining rules from Spring Boot, except JavaDoc + a few additional ones
2016-05-12 19:19:59 -04:00
Marius Bogoevici
a974ff7773 Checkstyle rules for imports and cleanup
Fixes #529

- enforced Spring Framework ordering rules
- disallowed static imports except for specific classes in test frameworks
2016-05-11 22:13:18 -04:00
Marius Bogoevici
8274d48cad Upgrade to Spring Boot 1.4.0.BUILD-SNAPSHOT 2016-05-11 16:23:18 -04:00
Marius Bogoevici
296d710969 Update project version to 1.1.0.BUILD-SNAPSHOT 2016-05-10 19:41:15 -04:00
bamboo
e211a6340d [artifactory-release] Next development version 2016-05-10 13:33:46 +00:00
bamboo
53f1839a82 [artifactory-release] Release version 1.0.0.RELEASE 2016-05-10 13:33:46 +00:00
Marius Bogoevici
b579ddbcc5 Restore the option to run Kafka tests embedded vs. external
Honour the `SCS_KAFKA_TEST_EMBEDDED` flag when set as an environment variable
or Java property: when explicitly set to `false`, use an external broker and observe the
`SCS_EXTERNAL_SERVERS_REQUIRED` property (i.e. fail if server is missing). By default,
continue to run tests using an embedded broker.
2016-05-10 09:12:34 -04:00
Marius Bogoevici
a86d47315b Upgrade to Spring Cloud Build 1.1.1.BUILD-SNAPSHOT
- removed redundant overrides
- added explicit version for maven-antrun-plugin (not inherited from Spring Boot Parent anymore)
2016-05-09 15:58:58 -04:00
Marius Bogoevici
34885ed975 Revert Spring Cloud Commons upgrade until a fix for docs is available 2016-05-08 20:18:10 -04:00
Marius Bogoevici
4c35c7ff59 Use Spring Cloud Commons 1.0.0.RELEASE
- Remove outdated `spring-core` and `spring-integration` overrides
2016-05-08 19:18:33 -04:00
Matt Benson
9119e794c8 simplify KafkaMessageChannelBinder ctor call 2016-05-06 12:51:23 -04:00
Matt Benson
5b05637cd4 add missing accessors for configuration properties' array members 2016-05-05 10:16:43 -05:00
Marius Bogoevici
02ee8d4d88 GH-509: Rework Topic Autoconfiguration
Fixes #509

- prevent autoconfiguration from reducing the existing partition count and/or replication factor

Split `autoConfigureTopics` in two separate settings, one for `autoCreateTopics`
and one for `autoAddPartitions` (to existing topics)

Renamed `defaultMinPartitionCount` to just `minPartitionCount` on the Kafka binder
2016-05-04 15:32:11 -04:00
Marius Bogoevici
8d5bf66c7f GH-504: AutoConfiguration of Kafka Topics
Add a flag for controlling topic autoconfiguration by the Kafka binder

Fixes #504

- introduces a new binder setting `autoConfigureTopics` that allows the user to disable the automatic creation of topics by the binder

Additional tests for partitioning

Adding missing documentation for `replicationFactor`
2016-05-03 10:08:16 -04:00
Marius Bogoevici
1d6ab21067 Use the binder minPartitionCount property for consumers
Fixes #495

Currently, `minPartitionCount` is available both as a binder default and as a consumer property.
It would be simpler if it only was a binder setting (seeing as it has effect only as a default).
2016-05-03 12:04:08 +05:30
Marius Bogoevici
fa42b62074 Add retry and DLQ support for the Kafka binder
Fixes #498

- Honour the retry settings from ConsumerProperties;
- Add an additional  `enableDlq` option in KafkaConsumerProperties that enables forwarding failed messages to a DLQ topic.
2016-04-29 12:27:54 -04:00
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
Marius Bogoevici
0bd7899a77 Kafka Binder uses a fixed-size daemon thread pool
Fix #500

- Initialize a fixed-size ExecutorService of the size of the concurrency setting of the binder
- Clean up the ExecutorService on unbind
- Remove unused `spyOn` support
2016-04-26 16:33:27 -04:00
Marius Bogoevici
6227e24e5d Exclude log4j as a Kafka binder dependency
Fixes #480
2016-04-18 13:13:40 -04: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
Marius Bogoevici
e18cff39a6 Make sure that raw tests exercise raw mode 2016-04-07 12:13:00 -04:00
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
502d275b41 Move message header mode as a generic property
- Both the producer and consumer properties have `HeaderMode`
 - Handle the case of embeddedHeaders and raw for both the Sending/ReceivingHandlers in Redis binder

This resolves #408

Move message values extraction to superclass
2016-04-06 15:53:12 -04: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
6c442b7421 Fix compiler warnings
This resolves #467
2016-04-04 20:20:45 -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
Mark Fisher
2b397b45a7 Moving the Redis Binder out to its own repo
removed redis starter
2016-03-17 15:26:07 -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
6bbf688d63 Preserve contentType when de-serializing messages from non-SCSt app
- When deserialising the message, replace `contentType` with the `originalContentType` only if the `originalContentType` isn't null which means the original content type was set by the producer before serialising.
 - Add and fix tests

This resolves #404
2016-03-09 17:53:25 +01:00
Ilayaperumal Gopinathan
4d8fa19a3a Support text/* contentType sent by non-SCSt applications
- When deserializing the payload at the consumer endpoint, the non-byte stream payload type requires to use `String` object when the underlying message content-type is of any `text` type contentType (text/plain, text/xml and text/html).
 - This fix is only needed to support any non-SCSt applications that will have the 'text/*` contentType of the message that is being deserialized
 - Add test

This resolves #403
2016-03-07 11:51:25 +05:30
Ilayaperumal Gopinathan
6acb825ad5 Remove XD references in SCSt code base 2016-03-04 15:04:53 -05:00