Commit Graph

700 Commits

Author SHA1 Message Date
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
Ilayaperumal Gopinathan
ba18c01602 Avoid eager creation of bound target beans
- At StreamListenerBeanPostProcessor, avoid eager creation of inbound/outbound target beans whenever possible
  - Use `applicationContext.getType(targetName)` instead of `applicationContext.getBean(targetName)` which checks the type of target beans from bean factory instead of creating the bean eagerly.
  - For declarative method invocation, `applicationContext.getBean` is needed as it requires the actual bean as its argument

Resolves #767

Update the test

 - ignore bean definition not found exception when the bean definition doesn't exist
2017-03-24 16:12:30 -04:00
Julian Hanhart
d250022250 Fix URLs used by ConfluentSchemaRegistryClient
Fix #845

Fixed resource path for fetch by SchemaReference in the ConfluentSchemaRegistryClient.
2017-03-20 11:39:48 -04:00
Vinicius Carvalho
d78adea895 Avoiding duplicate entries on properties map
Fix #859

Instead of sending out all matching relaxed properties
we now pick up one single canonical format and send
the data to consumers using it.

Formatting settings
2017-03-18 19:13:17 -04:00
Ilayaperumal Gopinathan
69cbc7f05b Exclude test support binder from binder type registry
- Given the TestSupportBinder has its own BinderFactory that returns the TestSupportBinder, we need to exclude the BinderType entry of TestSupportBinder detected from classpath
  - This will make sure to exclude test support binder when TestSupportBinderAutoConfiguration is excluded when using other explicit binder in tests

Resolves #827

Set defaultCandidate to false for TestSupportBinder

 - Set `defaultCandidate` to false for the TestSupportBinder using an environment post processor
 - At BinderFactoryConfiguration, don't override the 'BinderProperties' set via declared binders
   - Set `defaultCandidate` to `true` only for the binders set via BinderTypeRegistry without overriding their binder properties
2017-03-17 14:08:38 -04:00
Ilayaperumal Gopinathan
8e87f2bece Add doc for using errorChannel subscription
Resolves #849
2017-03-15 16:17:04 -04:00
Soby Chacko
edc37ce53e Allow non byte array payload with raw HeaderMode
Fixes #855
2017-03-15 13:54:15 -04:00
Marius Bogoevici
fddf3fb29b Set version to 1.2.0.BUILD-SNAPSHOT 2017-03-13 18:53:55 -04:00
Marius Bogoevici
23a738d3f9 Release 1.2.0.RC1 2017-03-13 18:53:17 -04:00
Marius Bogoevici
3544fe4899 Use Spring Cloud Build 1.3.1.RELEASE 2017-03-13 18:50:47 -04:00
Vinicius Carvalho
e05d5e03bd Initial metrics implementation 2017-03-13 18:13:27 -04:00
Ilayaperumal Gopinathan
8230a8b348 Fix StreamListener method with no explicit declarative method params
- Treat methods with Object arguments as 'handler' as opposed to 'declarative'
 - Add test

Resolves #844

Check object type to decide handler method
2017-03-13 14:13:27 -04:00
Ilayaperumal Gopinathan
567bdb4b2c Clarify content type conversion in doc
Resolves #797
2017-03-13 13:47:52 -04:00
Gary Russell
c9e83bb62c Fix Partition-Capable Tests 2017-03-10 15:22:38 -05:00
Gary Russell
bd1454bfff kGH-21: Add BinderHeaders.PARTITION_OVERRIDE
See spring-cloud/spring-cloud-stream-binder-kafka#109
See #851

Add Prefix to Partition Headers

originalContentType remains as-is for backwards-compatibility.

Enhance Javadoc
2017-03-10 13:38:18 -05:00
Ilayaperumal Gopinathan
f14d4d85c5 Add tests for PartitionInterceptor's preSend
- Check header updates with/without explicit 'partition' header in the message
2017-03-10 15:04:20 +05:30
Gary Russell
34acc2d190 Kafka GH-21: Don't Override User Partition
See spring-cloud/spring-cloud-stream-binder-kafka#109

If the user app sets the `BinderHeader.PARTITION_HEADER`, don't override it in the binder.
2017-03-10 14:07:10 +05:30
Marius Bogoevici
21cc1e9b58 Polishing 2017-03-08 16:09:55 -05:00
Vinicius Carvalho
4cd9b0c3ec Introducing caching
Fix #832 #752

Adds caching capabilities to the converter. Remote calls to the
registry, Schema Parsing and toString were very expensive operations
that are now being cached

Adds a decorator to the registryClient that allows caching of remote
invocations.

Fixing review comments
2017-03-08 12:45:19 -05:00
Marius Bogoevici
a67fe02fd7 Handle @StreamListener properly as meta-annotation
Fix #841

* Use `AnnotatedElementUtils`
* Formatting for the additional test
2017-03-07 14:34:11 -05:00
David Turanski
ddce282147 Add failing test 2017-03-07 12:29:39 -05:00
Ilayaperumal Gopinathan
841e05b266 Add note on aggregate application doc
Resolves #785

Fix review comments
2017-03-06 11:42:45 -05:00
Marius Bogoevici
db25c9948e Add back router example, fixes 2017-03-03 17:37:15 -05:00
Ilayaperumal Gopinathan
e029d4954e Doc for binding dynamic destinations
Resolves #710

Add simple example
2017-03-03 17:37:15 -05:00
Ilayaperumal Gopinathan
347cac75f2 Doc for non self-contained aggregate application
Resolves #818
2017-03-02 10:13:25 +00:00
Vinicius Carvalho
06e9339f7d Merge branch 'ilayaperumalg-schema-server-get-request-doc' 2017-03-01 16:23:58 -05:00
Ilayaperumal Gopinathan
6d53625acd Doc for schema server REST endpoint /schema/format
Resolves #828
2017-02-23 12:07:51 +05:30
Vinicius Carvalho
1558bdf540 List schemas by subject
Fixing code style
2017-02-23 11:02:25 +05:30
Marius Bogoevici
07492c0a02 Use Spring Cloud Build 1.3.1.BUILD-SNAPSHOT 2017-02-21 14:53:54 -05:00
Marius Bogoevici
16aac0c2b4 Set version to 1.2.0.BUILD-SNAPSHOT 2017-02-21 14:53:00 -05:00
Marius Bogoevici
33f54fc758 Release 1.2.0.M2 2017-02-21 14:51:12 -05:00
Marius Bogoevici
2e3ddcebd7 Remove shading artifact 2017-02-21 14:43:28 -05:00
Marius Bogoevici
723338fac8 Use Spring Cloud Build 1.3.1.M1 2017-02-21 14:36:06 -05:00
Marius Bogoevici
e46d7ede73 Register references to child context instead of the bindable proxies
Fix #819
2017-02-21 12:20:08 -05:00
Marius Bogoevici
02fdd7c9dd Add Documentation for @StreamListener Dispatching
Fixes #820

Addressing PR comments
2017-02-21 12:13:52 -05:00
Ilayaperumal Gopinathan
086895f6f8 Fix non self-contained aggregate application binding
- Remove conditionalOnMissingBean check on the necessary beans that are required for exernal bindings of the child application
 - Add test to verify

Resolves #816
2017-02-20 17:38:51 +05:30
Marius Bogoevici
b38a65cdbc AbstractMessageChannelBinder can have a null headers list
Fix #812
2017-02-19 14:12:20 -05:00
Marius Bogoevici
076f0ac1cb Add Dispatching Capabilities to @StreamListener
`@StreamListener` has support for a `condition` parameter,
that contains a SpEL expression that is evaluated before the
method is invoked.

Fix #682

Move StreamListenerMessageHandler as a top level class

Use dispatching and add test

Refactor dispatching mechanism

Throw error when conditions are used in declarative mode

Make StreamListenerAnnotationBeanPostProcessor overridable

Remove unused field in test

Address some PR comments

Add placeholder resolution

Update how multiple matches work with return values

- Methods with return values are not allowed to specify conditions
- If multiple matches are detected (e.g. multiple methods without
  conditions, or a mix of methods with and without conditions)
  checks that all of them have no return value;
2017-02-17 13:47:43 -05:00
Marius Bogoevici
a64860abc8 Copy existing BindingProperties values when replacing bound map
Fix #810
2017-02-16 22:15:58 +05:30
Ilayaperumal Gopinathan
8792423abc Not enforcing EnableAutoConfiguration on aggregate parent
- The aggregate parent configuration now imports the required auto configuration classes such as ChannelBindingAutoConfiguration and EndpointAutoConfiguration
while `@EnableBinding` is still at the parent configuration to be able to share the binding configuration among the child applications
 - Add `ConditionalOnMissingBean` in spring cloud stream auto configuration classes so that if `EnableAutoConfiguration` is enabled at child application classes
they don't get instantiated again
 - Conditionally import EmbeddedServlet auto-configuration when web environment is enabled for parent
 - Add test

Resolves #737
2017-02-16 15:48:52 +00:00
Ilayaperumal Gopinathan
2df9f9b4ee Update PartitionHandler partition properties during initialization
- The PartitionHandler has per-binding partition properties derived from the producer properties for the binding
   - These partition properties (especially PartitionKeyExtractorStrategy and PartitionSelectorStrategy)  need not be initialized when the messages are processed; instead they can be set during the PartitionHandler instantiation
 - Add tests

This resolves #772

Refactor PartitionHandler
2017-02-15 23:17:12 -05:00
Soby Chacko
48c53ef278 Making ProvisioningProvider protected; Javadocs
Fixes #803

Making ProvisioningProvider use a generic type so that subclasses don't have to cast
2017-02-14 13:08:46 -05:00
Gary Russell
51a7f8bf66 RabbitMQ - GH-43 - Support Fix For Routing Key
See spring-cloud/spring-cloud-stream-binder-rabbit#43

Make Routing Key Check Method Name More Expressive
2017-02-13 18:07:00 -05:00
Soby Chacko
392b087af6 Introducing Provisioning SPI
- Provide an API for provisioning middleware specific concerns independent of the binder
 - Make the corresponding changes in AbstractMessageChannelBinder

Fixes #745

Addressing PR review comments

Adding ProvisioningException to the SPI for provisioning

Addressing PR review comments
2017-02-13 15:44:27 -05:00