Commit Graph

545 Commits

Author SHA1 Message Date
Soby Chacko
8dd22ebca0 Move calling afterProperties on consumer and producer endpoints from binder implementations to core 2016-07-28 19:00:35 -04:00
Marius Bogoevici
08d65a92bb Initial support for Reactive API
Fixes #520
Fixes #458 (for non-reactive binders)

Adds spring-cloud-stream-reactive module.
Introduces support for declarative @StreamListener and @Input and @Output annotated parameters.
Add StreamListenerArgumentAdapter and StreamListenerResultAdapter for wrapping bindable inputs
and outputs when passing arguments to declarative @StreamListener.
Adds support for using reactive types (Flux/Observable) with traditional binders.
Introduce FluxSender and ObservableSender for handling multiple streaming outputs per method.
Ensure that errors are caught and logged.

Fixing constructor assertions and Javadoc

Addressing PR comments

- rework @Input/@Output parameter validation
- renamed StreamListenerArgumentAdapter to StreamListenerParameterAdapter
- ensure that parameter direction is accounted for in the current adapters
2016-07-26 14:47:03 -04:00
Marius Bogoevici
55b9aa75dd Rework the converter system
Fixes #505

The goals are twofold: to simplify the registration of new converters and
to add some consistency to the conversion process, and align them with the
way converters are used in generic Spring Messaging listeners, by describing
two possible transformations: inbound, message (including contentType)->targetClass,
and outbound payload+headers -> message. The idea is for the two
transformations to match the input and output directions of the bound channels.

List of changes:

- Create and configure input/output channels distinctly - reflected
  in the definitions of `BindableChannelFactory` and `MessageChannelConfigurer`;
- Replace AbstractFromMessageConverter with bidirectional converters;
- Use the channel direction (input/output) to determine whether
  `toMessage` or `fromMessage` will be invoked;
- Use contentType support from `AbstractMessageConverter` to map
  converters to mime types instead;

Making converters more robust

Addressing comments

Convert content type headers to String before serializing

Addressing further PR comments
2016-07-22 17:02:38 -04:00
Marius Bogoevici
bd92af4784 Add AbstractMessageChannelBinder
Handle common aspects of message-channel binders:
- added generic, customizable ReceivingHandler and SendingHandler
- made doBindProducer delegate to a series of template methods
- made doBindConsumer delegate to a series of template methods
- moved partitioning to an interceptor, thus fixing #493

Removed unused manual ack handling
2016-07-18 17:15:49 -04:00
Eric Bottard
7607d781c7 Fix doc typo 2016-07-08 16:42:48 +02:00
Soby Chacko
463de397bd binder moving - cleanup 2016-06-28 22:06:31 -04:00
Gunnar Hillert
af2702e62f gh-580 Include API Docs in Docs Zip 2016-06-23 13:43:09 -10:00
Ilayaperumal Gopinathan
74189942f4 Remove RabbitTestSupport class 2016-06-23 12:34:30 +02:00
Soby Chacko
ccea09f8a9 Remove Kafka specific test rules from core repo 2016-06-21 20:49:46 -04:00
Eric Bottard
97f4b0f5f4 Move binders out of the main repo
Fixes spring-cloud/spring-cloud-stream#546

Fixing merge conflicts
2016-06-21 16:28:48 -04:00
Marius Bogoevici
daf454410c Polishing for GH-570
- Add back old property in deprecated form for backwards compatibility.
2016-06-08 11:20:31 -04:00
Simon Weis
c1f4ba66d3 Fix typo in RabbitBinderConfigurationProperties
Substitute adminAdresses with adminAddresses.
2016-06-08 11:20:31 -04:00
Marius Bogoevici
f8e4df4711 Rabbit Configuration Corrections
Fixes #564

- Correct an issue where if the `cloud` profile is enabled but no Connectors are available,
no `ConnectionFactory` will be created;
- Introduce a property named `spring.cloud.stream.overrideCloudConnectors` that allows
to suppress the use of Cloud connectors in the application and fall back to Spring Boot
configuration. This is provided so that specific binders can be created with arbitrary
connectivity parameters if needed.
- Add documentation.
2016-06-07 17:11:16 -04:00
Dave Syer
9a65728cc6 Migrate to mvn 3.3.9 2016-06-04 09:14:54 +01:00
Ilayaperumal Gopinathan
9207811214 Fix mainApplicationClass for child contexts
- Make sure to set the appropriate mainApplicationClass name for the child applications

This resolves #562
2016-06-03 21:20:14 +05:30
Marius Bogoevici
0076c7b9f5 Update to Spring Integration Kafka 1.3.1.RELEASE 2016-06-02 16:45:40 -04:00
Mark Fisher
4d8ced734b polishing 2016-06-02 13:36:05 -04:00
Marius Bogoevici
6eddac9056 Allow binders to not affect the defaulting process
Fixes #557

Allow for a `defaultCandidate` flag on a binder configuration that, when FALSE,
ensures that the binder does not interfere with the default configuration process.
2016-06-02 13:22:14 -04:00
Marius Bogoevici
53d86f5523 Simplify marshalling of JSON messages
Fixes #558
2016-06-02 18:33:16 +05:30
Marius Bogoevici
99db7dff9b GH-541 Make reconnect time for Kafka/Rabbit configurable 2016-06-01 14:12:26 -04:00
Marius Bogoevici
aef08a28a3 Move tests to AssertJ 2016-06-01 13:10:42 -04:00
Eric Bottard
fbe9bbac7e Fix doc source formatting 2016-06-01 15:40:09 +02: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
Ilayaperumal Gopinathan
892797c0b0 Clarify channel names in the doc
Fixes #551
2016-05-26 11:53:12 -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
Ilayaperumal Gopinathan
48d2888b71 Fix retry consumer properties for Kafka
- Remove `ignored by Kafka` for the retry properties
2016-05-16 16:41:48 +05:30
Ilayaperumal Gopinathan
bcc45b8685 Use random port in StreamListenerTests 2016-05-13 11:44:35 +05:30
Ilayaperumal Gopinathan
33500ae183 Use random server port in ModuleAggregation tests 2016-05-13 11:44:28 +05:30
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
bbe5b3ee56 Fix Travis build target 2016-05-12 15:57:07 -04:00
Marius Bogoevici
91958ce53d Travis updates
- Remove use of .settings.xml in favour of Spring profile
- Use external Kafka broker
2016-05-12 15:27:06 -04:00
Dave Syer
49e20d38c2 Re-instate .settings.xml for Travis 2016-05-12 11:34:46 +01:00
Dave Syer
bdea2c7a37 Update README and remove .settings.xml where appropriate 2016-05-12 10:47:36 +01: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
9668cb968f Upgrade to Spring Cloud Build 1.1.1.RELEASE 2016-05-10 08:38:56 -04:00
Ilayaperumal Gopinathan
6bc5c8c1c1 Upgrade RxJava to 1.1.5
This resolves #552
2016-05-10 16:39:31 +05:30
Ilayaperumal Gopinathan
de7d71255b Add doc for multiple destination names when binding consumer 2016-05-09 16:03:43 -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
Ilayaperumal Gopinathan
af31dbeeeb Doc cleanup 2016-05-09 14:31:53 +05:30
Marius Bogoevici
cc639d2855 Add documentation for Binder SPI
Fixes #476 #278
2016-05-09 11:30:26 +05:30
Marius Bogoevici
678ed0387f Add documentation for content type and transformation
Fixes #421

- Porting and adjusting the applicable Spring XD documentation
- Adding StreamListener section
2016-05-09 11:14:39 +05:30
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