Commit Graph

743 Commits

Author SHA1 Message Date
Soby Chacko
c3246f3257 GH-722: Add support for Reactive Sources
Fixes spring-cloud/spring-cloud-stream#722

Addressing PR review comments

Further addressing PR review comments
Degenericizing `StreamListenerResultAdapter` with the 3rd generic argument
added for returning `Disposable` `StreamListenerResultAdapter` adapt method
now returns `java.io.Closeable`

Addressing PR review comments

Addressing PR review comments

Converting `FluxToMessageChannelResultAdapter` to `PublisherToMessageChannelResultAdapter`

Add `logback.xml` for reactive tests

* Revert `AopUtils.getTargetClass(bean)` to really deal with target classes only.
Although it does not make any effect on the `@Configuration` classes
* Use `AnnotatedElementUtils.isAnnotated()` instead of `getMergedAnnotation()`
to avoid synthetic methods in the `@Configuration` classes
* Add artificial `.transform()` to the `IntegrationFlow` test to overcome
SI Java DSL bug
* Apply similar `.map()` for `Flux` tests configs for proper assertions

* Simple code style polishing
2017-06-21 13:15:14 -04:00
Marius Bogoevici
51deb128f0 Option to suppress header propagation with SI message handlers
Add `SpringIntegrationProperties` class with
`spring.cloud.stream.integration` prefix for managing
Spring Integration properties.

Add `spring.cloud.stream.integration.messageHandlerNotPropagatedHeaders`
for controlling headers propagated by reply producing handlers.

Fix #943

Remove SI version override
Cleanup

* Simple polishing according PR comments
2017-06-19 10:59:47 -04:00
Marius Bogoevici
25be13a89f Fix Aggregate Source documentation
Fixes #987
2017-06-16 13:51:38 -04:00
Marius Bogoevici
31fdd5b5b6 Remove Bamboo build status 2017-06-15 14:15:02 -04:00
Marius Bogoevici
97ca311b57 Ignore unknown binder types if not used
Fix #972

Do not throw an error when binder configurations are
processed, unless a binder configuration that references
an unknown binder type (i.e. not found on the classpath)
is actually used by an application.

This allows supporting scenarios like
http://docs.spring.io/spring-cloud-dataflow/docs/1.2.0.RELEASE/reference/htmlsingle/#dataflow-multiple-brokers
where a set of binder configurations is passed to a number
of applications that might or might not have a specific
binder type on the classpath. If a specific binder configuration
is not used by the application, it can be ignored.

polishing
2017-06-08 21:16:13 -04:00
Marius Bogoevici
18b19fc323 Use distinct consumer groups per test 2017-05-21 10:36:20 -04:00
Soby Chacko
338282455f Updating to next major release line: 1.3.0.BUILD-SNAPSHOT
Fix #968
2017-05-17 11:15:34 -04:00
Soby Chacko
ffcff3fcd1 Next update: 1.2.3.BUILD-SNAPSHOT 2017-05-16 15:37:51 -04:00
Soby Chacko
43352fa850 1.2.2.RELEASE 2017-05-16 15:17:28 -04:00
Soby Chacko
4dd6072f13 Fixing StreamListener javadoc issues
Fix #893
2017-05-16 14:10:32 -04:00
Jon Archer
b1285c3d4a Extract schema version not id in register method.
Fix #965

Original implementation was getting the schema id and using it as the
version. This made deserialization fail since it would endeavor to
retrieve the schema by version using the id value.
2017-05-15 22:01:29 -04:00
Ilayaperumal Gopinathan
bd002e4aaf Add code formatting guidelines
Add 'eclipse' folder containing Eclipse code
formatter configuration and instructions how to use
 it.

Update rule for join_wrapped_lines

 - Set to `false`

Resolves #930

Update README

Address review comments
2017-05-15 13:03:45 -04:00
Marius Bogoevici
9632546f03 Revert content type propagation changes
Fix #962

Revert adff0fa38b

Postpone resolution of GH-943 until the resolution
of https://jira.spring.io/browse/INT-4276
2017-05-15 12:40:35 -04:00
Marius Bogoevici
03f23f790a AbstractMessageChanelBinder observes Disposable
- If the endpoints produced by `createConsumer` or
  `createProducers` and Spring `DisposableBean` instances
  then call `Destroy` on unbind.

Fix #953
2017-05-12 15:43:23 -04:00
Henryk Konsek
8b202aac2f Fixed documentation typo. 2017-05-12 09:26:46 +02:00
Gary Russell
adff0fa38b GH-943: Don't Propagate contentType
Resolves: https://github.com/spring-cloud/spring-cloud-stream/issues/943

There is a current limitation in that the contentType is not currently
stripped if the message is forward unchanged. But this is likely unusual.
See https://jira.spring.io/browse/INT-4272
2017-05-11 18:06:13 -04:00
Vinicius Carvalho
516ba13402 Make MetricJsonSerializer thread-safe
- Fix the unsafe use of `DateFormatter`

Fix #922
2017-05-10 23:32:27 -04:00
Oleg Zhurakousky
8e77993fad GH-897 fixed the NPE issue with CacheManager
- Added a new constructor which takes CacheManager as an argument
- Deprecated the old constructor and setter for CacheManager
- Added fallback to NoOpsCacheManager to the deprecatd construtor to avoid the possiblity of NPE.
- Added warning to notify user that caching is _effectively disabled_ if NoOpCacheManager is used.

Fix #897
2017-05-10 22:53:58 -04:00
Oleg Zhurakousky
8fc0cf1a0c GH-927 Fixed GMT formatting issue
Fixed DateFormat definition to include 'ISO 8601 time zone' designator (see https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html)
Added constamt TimeZone to dateFormat
Added test

GH-927 fixed imports
2017-05-01 11:12:17 -04:00
Artem Bilan
ce772bc8a2 Increase poll timeout for Metrics tests to 10 sec
Sometimes 1 second is really not enough to wait for the answer
from other thread, especially on the slow, hard-busy CI server
2017-04-27 17:27:02 -04:00
Gary Russell
8e73174040 GH-931: Fix BinderAwareChannelResolver Concurrency
Fixes https://github.com/spring-cloud/spring-cloud-stream/issues/931

While the resolver binds the channel and registers the bean in a synchronized block,
it does not re-check that another thread has already done the work.

Add a second `super.resolveDestination()` to the synchronized block.
2017-04-27 16:33:12 -04:00
Marius Bogoevici
63ff75f766 Set next development version 1.2.2.BUILD-SNAPSHOT 2017-04-11 22:21:03 -04:00
Marius Bogoevici
a33b9bfbe4 Release 1.2.1.RELEASE 2017-04-11 22:11:24 -04:00
Marius Bogoevici
6bdca86660 Minor: line ending doc 2017-04-11 18:37:40 -04:00
Marius Bogoevici
98ca7f978a Update metrics sample
Fix #918
2017-04-11 18:09:28 -04:00
Marius Bogoevici
1459400158 Clear the exportProperties cache on refresh
Fix #910
2017-04-11 12:02:01 -04:00
Marius Bogoevici
523a3cfdab Observe priority when populating the exported properties
Fix #909

- If a property is already present in the exported list
  it means that it's been put there by a higher priority
  source - so we can skip it
2017-04-10 21:00:50 -04:00
Marius Bogoevici
ab76178b82 Handle placeholders and SpEL in metrics properties
Fix #907

- Placeholders are replaced and expressions are evaluated
  before on attached properties

Add test for default value
2017-04-10 21:00:39 -04:00
Marius Bogoevici
d6fe841a63 Align the exporter and the trigger name
Fix #903

Use 'application' as the trigger name consistently.

Since 'application' would be a too generic name for
the Exporter bean, use a BeanPostProcessor to install
the exporter in the `MetricExporters` bean.

Additional updates

- rename binding to `applicationMetrics` (we can decide later how
  the channel is named)
- remove the default setting for `spring.metrics.export`
- Improve documentation

Fix #904

Docs updates

Properly escape asciidoc control characters
2017-04-10 15:37:52 -04:00
Marius Bogoevici
161011fcde Restrict shading to classes in rxjava-reactive-streams
Fix #906
2017-04-07 13:17:09 -04:00
Marius Bogoevici
ec05e6cf44 Fix metrics properties prefix
Fixes #900
2017-04-06 11:19:43 -04:00
Soby Chacko
92fc292386 Next version:1.2.1.BUILD-SNAPSHOT 2017-04-04 15:02:03 -04:00
Soby Chacko
54678571df Release 1.2.0.RELEASE 2017-04-04 14:51:35 -04:00
Marius Bogoevici
e7fec479ee Additional refactoring
- Rename `BindingFactoryListener` to `Listener` and reduce
  its visibility, making it effective only when used with
  a `DefaultBinderFactory` implementation.
- Rename a couple methods
- Make `ChannelEndpointConfiguration` an autoconfiguration
  in its own right
2017-04-04 10:30:30 -04:00
Ilayaperumal Gopinathan
a309fa772e Make spring-boot actuator as optional dependency
- BinderFactoryConfiguration has a conditional configuration that creates `BinderFactory` with binder health indicators only if the spring-boot `actuator` is in classpath
 - Move Channels endpoint configuration into a separate conditional configuration class

Resolves #869

Use listener approach instead of subclassing

Use auto-configuration for binders healthIndicator configuration
2017-04-04 10:30:30 -04:00
Marius Bogoevici
9ea4ff324c Convert byte[] via text/plain to String
Fix #898

When the payload is `byte[]` ensure that the
String is the String representation, not the
toString() conversion result.
2017-04-04 14:29:52 +05:30
Marius Bogoevici
8f3e448f07 Schema support documentation polishing 2017-04-03 18:47:06 -04:00
Vinicius Carvalho
44f66543d0 Adding improved section on schema evolution support
Fix #898
2017-04-03 18:46:51 -04:00
Marius Bogoevici
d17e70ddaf Metrics refactoring
- Change the metrics channel name to `applicationMetricsChannel`
- Update documentation
- Remove `instanceIndex` to reduce coupling to
  Spring Cloud Stream semantics and because it can be sent via
  the `properties` metadata set
2017-03-31 17:33:58 -04:00
Marius Bogoevici
c5632cd5f3 Add reference to Kryo 2017-03-31 10:45:12 -04:00
Marius Bogoevici
334ed57c00 Update test binder documentation
Fix #867

* Switch to Spring Boot 1.4 and later configuration
* Add artifact reference
* Remove @DirtiesContext and autowired BinderFactory field
2017-03-31 10:30:48 -04:00
Ilayaperumal Gopinathan
934e36ab09 Apply metrics channel name in RelaxedPropertiesUtilsTests 2017-03-31 15:57:04 +05:30
Vinicius Carvalho
7438fde088 Changing metrics channel name to align with boot 2017-03-31 15:48:09 +05:30
Dave Syer
07d0328d68 Convert BinderMetricsEmitter to an Exporter
Re-organize and re-name a bit
Rename config package
Use spring.metrics.export.* to configure the includes and excludes
2017-03-30 09:41:27 -04:00
Ilayaperumal Gopinathan
c812fa0374 Add test for EmbeddedHeaderUtils.headersToEmbed 2017-03-30 13:59:34 +05:30
Marius Bogoevici
27184a4cfc Internal refactoring - expose header embedding and serialization
Fix #888

- Rename `EmbeddedHeaderMessageConverter` to `EmbeddedHeaderUtils`;
- Add method to populate default header set;
- Make `serializePayloadIfNecessary` protected so it can be accessed by subclasses;
2017-03-30 13:08:39 +05:30
Ilayaperumal Gopinathan
6592c1a8cd Minor polishing
- Refactor conditional clause
2017-03-30 11:55:31 +05:30
Marius Bogoevici
ab9cf91803 Allow StreamListenerParameterAdapter to be applied more broadly
Fix #890
2017-03-30 01:24:40 -04:00
Marius Bogoevici
7dd5e50f82 Leniently support treating input Strings as JSON
Fixes #871

* Only support conversion based on `text/plain` header if target type is String;
2017-03-29 09:17:23 -04:00
Vinicius Carvalho
9fdd7f9fc5 Metrics: rename applicationName to key
Fix #879
2017-03-27 12:16:03 -04:00