Commit Graph

428 Commits

Author SHA1 Message Date
bamboo
13daf68697 [artifactory-release] Release version 1.0.0.RC1 2016-03-22 00:44:17 +00:00
Mark Pollack
7bf9215a6c Basic getting started example 2016-03-21 19:51:42 -04:00
Marius Bogoevici
04a7fe83a5 Updated property prefixes 2016-03-21 19:37:51 -04: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
Marius Bogoevici
a17c3fff50 Documentation
* Introductory and concepts section
* Programming model
* General Binding Properties + Rabbit
* Added kafka options
* Documentation revisions
2016-03-21 15:31:07 -04:00
Marius Bogoevici
95b0197dd7 Removing message history support 2016-03-21 19:28:55 +05:30
Ilayaperumal Gopinathan
216149b78d Rename BindingListenerTests -> StreamListenerTests 2016-03-21 19:04:29 +05:30
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
4d2ef3c4d0 Introduce StreamListener annotation
Fixes #156

- Supports Spring Messaging infrastructure for argument mapping and type conversion, sharing the same configured converters as the ones configured on input/output channels;

- Also: refactored AbstractFromMessageConverter to return only payload - conversion to a message enriched with the content type of the channel is done by a separate wrapping converter;
2016-03-17 16:02:51 -04:00
Marius Bogoevici
0aeef58495 Remove spring-cloud-stream-redis-binder from BOM 2016-03-17 15:26:21 -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
Patrick Peralta
f9f92ae184 Re-added setter for PartitionSelectorStrategy 2016-03-17 11:10:52 -04:00
Marius Bogoevici
af733faf18 Correct Rabbit defaults for headers 2016-03-17 01:58:45 -04:00
Ilayaperumal Gopinathan
29bafe9807 Create dynamic bindable channels using BindableChannelFactory
- This will make sure to trigger the appropriate message channel configurers

This resolves #411
2016-03-16 11:10:31 -04:00
Marius Bogoevici
3cd513d023 Minor polishing 2016-03-16 10:57:02 -04:00
Ilayaperumal Gopinathan
9abf36879d Set message header using BindingProperties' contentType
- Update MessageConverterConfigurer that uses a channel interceptor to check if the message contentType header is missing and if there is a binding property for `contentType` header is provided, then set that value as the message contentType header

This resolves #397

Add test
2016-03-16 12:41:29 +05:30
Ilayaperumal Gopinathan
d6c2b544e2 Use Set instead of List for supported datatypes
- in CompositeMessageConverterFactory
2016-03-16 11:52:51 +05:30
Marius Bogoevici
a7f21b542a Minor updates for custom content types
- renamed MessageConverterUtils.getJavaType to MessageConverterUtils.getJavaTypeForJavaObjectContentType and restricted usage only to 'application/x-java-object' types
2016-03-15 18:14:36 -04:00
Ilayaperumal Gopinathan
74c6223d3e Support custom message converters
- Autowire custom message converters into MessageConverterConfigurer
  - When configuring the message channel, set the `datatypes` of the channel based on the `supported` datatypes of all the matching message converters

This resolves #381
2016-03-15 17:19:31 -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
Marius Bogoevici
cb73f26466 Support application/json content type sent by non-SCSt applications
Fixes #399
2016-03-04 12:06:37 -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
b184f67ee1 Use TestSupportBinder instead of redis binder in integration tests
- Modify the integration tests to verify the usecases per app basis (that uses the TestSupportBinder for its channel binding)
 - Remove redis binder usage in integration tests

This resolves #380
2016-03-04 11:27:27 -05:00
Marius Bogoevici
14c46f6745 Renamed DynamicBindable to DynamicDestinationBindable 2016-03-03 16:01:35 -05:00
Ilayaperumal Gopinathan
66a78bf685 Unbind dynamic producers
- Add `SmartLifecycle` to BinderAwareChannelResolver
  - Add resolved destinations' bindings to the list of `Bindings` that need to be onbound
  - Add lowest phase for its lifecycle so that bindings are unbound at the latest

This resolves #370

Use a BindableAdapter to register the output channels

 - Add `DyanamicBindable` which is a BindableAdapter that stores the dynamic destination names and handle their unbinding
 - Inject `ChannelBindingService` into BinderAwareChannelResolver so that the dynamic binding gets registered with `producerBindings` and can subsequently be used when unbinding
 - Fix the `BinderAwareChannelResolver` to resolve the `transport:name` correctly by setting the bean name of the channel to use `name` only (without including transport:)
 - Update tests

Use Binding to unbind instead of ChannelBindingService
2016-03-03 15:57:16 -05:00
Ilayaperumal Gopinathan
41a24a13e6 Remove unused binder headers
- Remove `binderReplyChannel`, `replyTo` and `binderHistory` headers
2016-03-03 13:07:12 -05:00
Marius Bogoevici
6c7f794bcf Add back spring profile to pom.xml 2016-03-03 13:06:48 -05:00
Marius Bogoevici
ef1ec13c45 Update README.adoc 2016-03-02 16:47:34 -05:00
Marius Bogoevici
e7648d3b64 Update README.adoc 2016-03-02 16:46:15 -05:00
Marius Bogoevici
b1cc7c5836 Update README.adoc 2016-03-02 16:44:01 -05:00
Marius Bogoevici
1ab1d096ed Update Spring Cloud Build and Spring Cloud Commons to 1.0.0.RC1
- also remove the SI version customization as we can use the version brought by Boot now
2016-03-02 15:17:47 -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
Dave Syer
9f9bc66345 Fix mvnw script for milestones 2016-03-02 17:34:27 +00:00
Marius Bogoevici
5670e29776 Test fixes
Class rule for Redis
Do not pass message collector for test input bindings
2016-03-02 11:28:23 -05:00
Ilayaperumal Gopinathan
e77bcc3e4c Make SingleChannelBindable more generic
- Use `MessageChannel` instead of `PublishSubscribableChannel`
 - Remove error channel references
2016-03-02 11:18:39 +05:30
Ilayaperumal Gopinathan
d7c73fff00 Update samples link in doc 2016-03-01 21:09:53 -05:00
Marius Bogoevici
5e2e4ecd67 Separate error channel tests, some cleanup 2016-03-01 16:43:48 -05:00
Ilayaperumal Gopinathan
cae56385e0 Binding error channel
- bind Spring Integration `errorChannel` as a message producer when the property `spring.cloud.stream.bindings.error.destination` is set
    - The error channel will use this property value as the destination name
  - Add test

This resolves #329

Rename NoopBindable -> BindableAdapter

Return error channel name for getOutputs

Fix review comments

  - Modified integration test to use `Sink` interface
  - Add unit test
2016-03-01 12:50:20 -05:00
Marius Bogoevici
d2edea84ee Use 1.0.0.RC1 for Spring Tuple core 2016-03-01 12:28:23 -05:00
Marius Bogoevici
fb7e42d943 Upgrade Spring Tuple to 1.0.0.RC1 2016-02-26 17:12: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
Marius Bogoevici
995e268da5 Move parent() to AbstractApplicationBuilder 2016-02-26 00:05:54 -05:00
Dave Syer
22f5b7a15e Make AggregateApplicationBuilder more fluent
So you can add a parent for instance, like this:

new AggregateApplicationBuilder().from(TwitterStreamApplication.class)
	.args(new String[] { "--language=en" }).to(StreamTransformer.class)
	.parent(
		SpringApplication.run(ModuleApplication.class, args))
	.run();
2016-02-25 23:22:44 -05:00
Marius Bogoevici
84c274bb75 Remove reference to configuration-metadata 2016-02-25 23:21:00 -05:00
Ilayaperumal Gopinathan
00a5ac4341 Move module launcher/configuration metadata
This resolves #320
2016-02-25 22:44:00 -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
Mark Fisher
1dc1303b54 assert BeanFactory is not null 2016-02-24 16:54:16 -05:00