Commit Graph

447 Commits

Author SHA1 Message Date
Ilayaperumal Gopinathan
277d896e1d Use Jackson ObjectMapper from AutoConfiguration
- For the message converters that use Jackson ObjectMapper, autowire the ObjectMapper from JacksonAutoConfiguration
   - This will allow configuration of ObjectMapper using boot configuration properties `JacksonProperties`

 - Add test

This resolves #466
2016-04-06 09:57:40 -04:00
Ilayaperumal Gopinathan
4466331266 Set namespace when using AggregateApplication.run()
- When the apps are aggregated by calling AggregateApplication.run() the namespace for the apps need to be set before creating shared channel registry
2016-04-06 15:15:16 +05:30
Ilayaperumal Gopinathan
6816937827 Polishing AggregateApplication namespace handling 2016-04-06 13:46:58 +05:30
Venil Noronha
99f978a262 Fixes #428 - Enabled namespace propagation at AggregateApplication run.
Updated AggregationApplication* to honor app specific namespace.
2016-04-06 13:46:54 +05:30
Ilayaperumal Gopinathan
12bd4effa1 Allow AggregateApplicationBuilder with no arg constructor
- When the AggregateApplicationBuilder doesn't have constructor args set, then invoke parent configuration setup with no args.
  - This will make sure to set the parent context for the child application contexts

This resolves #464
2016-04-04 21:31:03 -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
Marius Bogoevici
0626cc8c07 Clean up the JSON rendering of ConsumerProperties and ProducerProperties (for actuator endpoints). 2016-04-04 19:57:46 -04:00
Ilayaperumal Gopinathan
f390feb42b ChannelsEndpoint to show all the binding properties
- Set the default destination name when it is not explicitly set
 - The producer/consumer properties would also be shown via BindingProperties
  - Handle JSON serialization when the value is of type Expression

This resolves #406 #426
2016-04-04 18:45:07 -04:00
Ilayaperumal Gopinathan
853e340a35 Remove unused Rabbit binder properties 2016-03-30 14:36:50 +05:30
Marius Bogoevici
0a2d826af5 Remove local and redis binders from BOM 2016-03-27 09:21:42 -04:00
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
Dave Syer
b5099b610e Fix asciidoctor errors when embedded 2016-03-24 16:27:12 +00:00
Ilayaperumal Gopinathan
6a125b601b Remove ConnectionFactorySettings configuration class
This resolves #386
2016-03-24 10:38:45 -04:00
Spencer Gibb
e5fdc971dd Update mvnw to determine profile on mac and linux 2016-03-22 13:19:46 -06: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
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