Commit Graph

108 Commits

Author SHA1 Message Date
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
Ilayaperumal Gopinathan
7021d2195d Set string value for originalContentType in message header
- Since the `originalContentType` header is preserved across the wire while the serialization/de-serialization processes take place using the deduced `contentType`,
it is convenient to set the `String` value of the `originalContentType` instead of setting the actual `MimeType` object in the header.
 - Once the `de-serialization` has taken place, the deduced `contentType` is always replaced with the `originalContentType` as the `contentType` in the message header and this preserved contentType can be resolved to its corresponding MimeType using `ContentTypeResolver` anytime. Hence, using the `String` object for `originalContentType` doesn't do any harm.

 - Fix the issue while setting the deduced contentType based on the `payload` when the `originalContentType` is `application/json`
   - Currently, the contentType is set to `text/plain` which seems incorrect
 - Also, add the `application/json` contentType to return `String` object during de-serialization process.

This resolves #383

Use `text/plain` contentType when the payload is of type `String`

  - This is for the intermediate contentType that is used for serialization/de-serialization
2016-03-04 11:39:30 -05:00
Ilayaperumal Gopinathan
41a24a13e6 Remove unused binder headers
- Remove `binderReplyChannel`, `replyTo` and `binderHistory` headers
2016-03-03 13:07:12 -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
69e484163c Move spring-cloud-stream tuple
- The `spring-cloud-stream-tuple` is now split into `spring-tuple`, `spring-integration-tuple` along with `spring-batch-tuple`
  - Update dependencies to use the new ones

This resolves #326
2016-02-26 17:12: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
Ilayaperumal Gopinathan
047a3f8d4f Support sync producer option in Kafka binder
- Add a binding property `spring.cloud.stream.bindings.<outputChannelName>.syncProducer`
   When set to `true`, the Kafka producer metadata is set to use `sync` producer
 - Update DefaultPropertiesAccessor for Kafka to use the `syncProducer` property
 - Add test

This resolves #343

Move syncProducer as a binder level property

 - Add a property `syncProducer` in Kafka Binder configuration properties (prefix: spring.cloud.stream.binder.kafka)
  - Set Kafka ProducerMeatadata `sync` based on the value set in this property
 - Update test
2016-02-23 00:23:18 -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
Mark Fisher
1b1ac1c07b use correct name for Redis consumer Binding 2016-02-22 17:14:38 -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
Marius Bogoevici
73b4b6fb3e Fix race condition in multi-destination test 2016-02-19 17:10:08 -05:00
Marius Bogoevici
b1b0e960d7 Corrections for health indicator
Ensure that try-catch is applied around connecting to Zookeeper as well
Register topics in use for consumer
2016-02-19 16:49:54 -05:00
Ilayaperumal Gopinathan
0fb431db3a Add Kafka binder health indicator
- Health indicator fetches broker addresses using ZK configuration and matches it with the leaders of the paritions being used in the binder

This resolves #297

Use Set instead of List to store error messages per broker

Exception handling when connecting to ZK

Add ZK connect/session timeout values as configuration properties

 - Set it in the Kafka binder so that the same can be used for health indicator as well

Rename ZK properties and move them to binder configuration properties
2016-02-19 14:19:39 -05:00
Soby Chacko
76c64e3763 Allow binding to multiple input destinations
More integration tests in AbstractBinderTests
Use embedded Kafka in the tests
2016-02-17 19:11:00 +05:30
Ilayaperumal Gopinathan
71b26b0ed3 Remove unused kafka binder properties 2016-02-15 12:53:57 +05:30
Ilayaperumal Gopinathan
47d1d69402 Refactor Kafka binder configuration
- Move KafkaBinderConfigurationProperties out of the configuration class
 - Remove defaultProperties bean creation and use `locations` in `ConfigurationProperties` to load the default properties

Move properties to @PropertySource and add tests
2016-02-12 10:24:12 -05:00
Eric Bottard
412b1dd294 Use kafka on the travis infrastructure
Fixes spring-cloud/spring-cloud-stream#314

Give more time to redis on travis

Make multipliers more versatile, apply to kafka

Extract receive() method. Default is now 1s

bump multiplier for kafka on travis
2016-02-10 14:12:46 -05:00
Marius Bogoevici
c4a64b37fb Minor: formatting, imports, copyright 2016-02-09 21:50:34 -05:00
Soby Chacko
7138f125ee Upgrade Spring Integration Kafka to 1.3 in Kafka binder
Upgrade scala/SIK versions in mvn pom

Migrage to KafkaNativeOffsetManager from KafkaTopicOffsetManager

Introduce LoggingProducerListener for errors - See GH #151

Remove properties specific to the Topic offset manager
2016-02-09 21:13:59 -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
Marius Bogoevici
a854e986aa Revert to Rabbit version provided by Spring Boot/Cloud
At the time of the commit it is 1.5.3.RELEASE, but it will pull the version as per the Spring Cloud parent version.
2016-02-04 11:36:35 -05:00
Mark Fisher
7ffe9070e3 removed more lattice references 2016-02-04 08:55:07 -05:00
Ilayaperumal Gopinathan
32c727a5d4 Remove lattice profile usages/references 2016-02-04 13:40:53 +05:30
Ilayaperumal Gopinathan
9c381d3b26 Fix exception type in kafka topic validation test 2016-02-04 12:48:42 +05:30
Mark Fisher
252aee4079 polishing 2016-02-03 19:51:17 -05:00
Marius Bogoevici
8271478e27 GH-306 Add support for start offset and reset flag
Resolves #306

Fix configuration property passing

Adjust property names, fix environment merging from parent
2016-02-03 19:32:51 -05:00
Ilayaperumal Gopinathan
8f795074e9 Allow underscore in kafka topic name
- Instead of escaping the topic name, perform validation that throws `RuntimeException` when the given kafka topic name doesn't meet the criteria set by Kafka.

This resolves #217
2016-02-03 15:34:10 -05:00
Dave Syer
e9286c849a Add spring-rabbit explicitly to the dependencies BOM
It actually still has to be managed using a property in
spring-cloud-stream-binders-parent, but this change is for users.
Any user that wants an app using stream and rabbit needs to use the
spring-cloud-dependencies BOM. A gradle user has to do nothing else
with this change. A maven user still has to add an explicit
<spring-aqmp.version/> to the application POM.
2016-02-03 09:05:20 +00:00
Eric Bottard
7fb834981a GH-291 Provide an option to create a mutable Tuple
This fixes spring-cloud/spring-cloud-stream#290
2016-02-02 17:23:43 -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
Marius Bogoevici
31961ae595 Add support for durable subscriptions in Redis 2016-01-29 19:04:12 -05:00
Dave Syer
dfe78f6d32 Fix Spring AMQP dependencies temporarily 2016-01-28 09:00:46 +00:00
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