Commit Graph

123 Commits

Author SHA1 Message Date
Artem Bilan
7cf4ccca25 Add ServiceConnectorConfig injection support
The SC-Connectors `ServiceConnector` can be customized via
`ServiceConnectorConfig`.

* Allow end-user to specify such a bean and support its injection in the
`rabbitConnectionFactory` and `producerConnectionFactory` bean definitions

**Cherry-pick to 1.3.x**

Add `spring-cloud-spring-service-connector` dependency to be able to
request from the application context only specific `RabbitConnectionFactoryConfig`.
Use `ObjectProvider.getIfUnique()` for the case when we have not a single
`RabbitConnectionFactoryConfig` bean in the ctx

* Configure Cloud CCF via Boot's `RabbitProperties`
* Obtain from the Cloud only one CF service
2017-12-21 11:35:06 -05:00
Oleg Zhurakousky
7f4580fba1 polishing
Resolves #115
2017-12-13 12:44:54 -05:00
Artem Bilan
9c76eccfe3 Fix producer ConnectionFactory
The `RabbitMessageChannelBinder` creates an internal distinct
`ConnectionFactory` instance based on the `RabbitProperties` for the
non-transactional producers to avoid dead locks when connection
is blocked.
In case of Cloud Connectors the `ConnectionFactory` bean is overridden,
but not `RabbitProperties`.
Therefore the original `ConnectionFactory` for consumers is good,
cloud-based, but for producers it is still based on the `RabbitProperties`
from Spring Boot, in most cases with default options.

* Add one more `producerConnectionFactory` `@Bean` to the
`CloudConnectors` configuration to obtain a distinct `ConnectionFactory`
instance from the cloud provider
* When we ara not in the cloud profile, create a fresh `ConnectionFactory`
based on the `RabbitProperties`
* Inject the extra `producerConnectionFactory` instance into the
`RabbitMessageChannelBinder` instead of the internal non-stable solution

**Cherry-pick to 1.3.x**
2017-12-13 11:17:09 -05:00
Oleg Zhurakousky
88434745d4 Removed warnings 2017-11-28 21:14:16 -05:00
Oleg Zhurakousky
0542404f1a Addressed boot changes to RabbitProperties 2017-11-22 16:55:07 -05:00
Oleg Zhurakousky
2e8e51c4dd polishing
Resolves #110
2017-11-14 09:17:36 -05:00
Gary Russell
203c8dbcea SCST-GH-1009: Producer properties dynamic bindings
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/1009
2017-11-14 09:10:28 -05:00
Gary Russell
1e0a8f206d GH-83: Add Expression evaluating interceptor
Fixes https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/83

Expressions for the routing key and delay (when using a delayed exhange) that
include the `payload` failed because they were evaluated after the payload was
serialized.

If either expression includes `payload`, add an interceptor to evaluate the expressions
before serialization and add the results as headers.

Polish tests

Resolves #83
Resolves #111
2017-11-14 09:08:18 -05:00
Soby Chacko
ef94f4c403 Fixing a typo in pom.xml 2017-11-09 10:33:13 -05:00
Soby Chacko
1ba17dcf0a Update to next version: 2.0.0.BUILD-SNAPSHOT
Update spring-cloud-build parent to 2.0.0.BUILD-SNAPSHOT
2017-11-09 09:45:16 -05:00
Soby Chacko
d9d53f85fc Update spring-cloud-connectors-core to 2.0.0.RELEASE for the release build 2017-11-09 09:36:08 -05:00
Soby Chacko
666b1334ca Update to release version: 2.0.0.M3
spring-cloud-build parent to 2.0.0.M4
2017-11-09 09:13:25 -05:00
Gary Russell
965fabd2d1 Polishing - add images for provisioned infrastructure
Resolves #101
Resolves #109
2017-11-01 21:01:10 -04:00
Gary Russell
04c8dd57d2 Polishing - PR comments. 2017-10-31 12:29:27 -04:00
Gary Russell
63b52dda76 GH-101: Documentation for partitioning
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/101
2017-10-31 11:45:17 -04:00
Gary Russell
2bdc714f5a Fix cloud connector dependency in pom 2017-10-31 11:42:49 -04:00
Oleg Zhurakousky
9e9d12b6eb polishing
Fixed RabbitBinderTests to ensure that all test channels are created thru AbstractBinderTests.createBindableChannel(..)

Resolves #104
Resolves $105
2017-10-26 11:31:29 -04:00
Gary Russell
05643b5947 GH-104: Missing queues fatal 'false' by default
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/104

To handle the use case of a Rabbit cluster with non-HA queues where the node hosting
a queue is down, set `missingQueuesFatal` to `false` by default.

Expose this property in the consumer config, together with the redeclaration retry properties.

Docs
2017-10-26 11:27:53 -04:00
Gary Russell
9f07fccaee Fix test NPEs caused by previous commit 2017-10-26 09:12:43 -04:00
Gary Russell
df5f2692b4 GH-107: Disallow HeaderMode.embeddedHeaders
It is invalid to configure a RabbitMQ binding to use embedded headers since
RabbitMQ supports headers natively.

Resolves: spring-cloud/spring-cloud-stream-binder-rabbit#107
2017-10-24 14:59:24 -04:00
Soby Chacko
8032a1ca9b Resetting stream,cloud and boot to 2.0.0.BUILD-SNAPSHOT 2017-10-19 12:41:37 -04:00
Soby Chacko
1eff6bd99a Next update version: 2.0.0.BUILD-SNAPSHOT 2017-10-19 10:04:41 -04:00
Soby Chacko
b6c2852c49 2.0.0.M2 Release update
Closes #103
2017-10-19 09:18:46 -04:00
Gary Russell
3c20034cb2 GH-93: Consume from existing queue
Resolves: https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/93

The Rabbit binder consumes from a queue named `<destination>.<group>`.

Add a property to omit the `<destination>.` part so users can use SCSt to consume from
existing queue(s).

* Polishing - PR Comments
2017-10-10 11:36:46 -04:00
Vinicius Carvalho
f4f1785e20 ContentType revamp
- Making tests compatible with new contentType behavior
2017-10-05 14:29:45 -04:00
Gary Russell
d516cfd3db Fixes for latest boot snapshot 2017-10-05 14:28:58 -04:00
Vinicius Carvalho
436c2114e8 Adding .jdk8 file, updating SI version to latest 2017-10-05 14:28:58 -04:00
Marius Bogoevici
cfc51e0732 Set version to 2.0.0.BUILD-SNAPSHOT 2017-10-05 14:28:09 -04:00
Marius Bogoevici
81185fecb4 Release 2.0.0.M1 2017-10-05 14:27:05 -04:00
Marius Bogoevici
69104fff83 Use Spring Boot version from Spring Cloud Build 2017-10-05 14:25:56 -04:00
Marius Bogoevici
3dcc71bdd4 Update to 2.0.x
- Update Spring Boot version to 2.0.0.BUILD-SNAPSHOT
2017-10-05 14:25:56 -04:00
Marius Bogoevici
23a4fbd54c Set version to 2.0.0.BUILD-SNAPSHOT 2017-10-05 14:25:33 -04:00
Marius Bogoevici
a738030c44 Release 2.0.0.M1 2017-10-05 14:25:33 -04:00
Marius Bogoevici
695daeecb1 Use Spring Boot version from Spring Cloud Build 2017-10-05 14:25:33 -04:00
Marius Bogoevici
f853dc4fc9 Update to 2.0.x
- Update Spring Boot version to 2.0.0.BUILD-SNAPSHOT
2017-10-05 14:25:33 -04:00
Gary Russell
0c6b024dfa Update POMs to 1.3.1.BUILD-SNAPSHOT 2017-09-29 16:30:08 -04:00
Gary Russell
8ab806595c Update POMs to 1.3.0.RELEASE 2017-09-29 15:45:06 -04:00
Artem Bilan
29f11694db GH-95: Add producerConnFactory into Rabbit Binder
Fixes spring-cloud/spring-cloud-stream-binder-rabbit#95

* To avoid blocked connection dead lock on consumers add
`ConnectionFactory` clone in the `RabbitMessageChannelBinder` for
non-transactional producers
* Add `DisposableBean` implementation into the `RabbitMessageChannelBinder`
to `destroy` all the spawned internal connection factories including
`LocalizedQueueConnectionFactory`

Address some PR comments:

* Copy `RabbitConnectionFactory` from the injected `CCF`
* Don't wrap `producerCF` into the `LocalizedQueueCF`
* Polishing code style

Make Latebinding test transactional

So the same connection factory is used.

There is a race condition in the proxy.
2017-09-29 15:32:25 -04:00
Gary Russell
4dcad5d941 Back to 1.3.0.BUILD-SNAPSHOT 2017-09-13 11:06:35 -04:00
Gary Russell
a9705967ec Update POMs to 1.3.0.RC1; s-c-build to 1.3.5 2017-09-12 16:09:14 -04:00
Gary Russell
0626668314 SCSt-GH-916: Configure Producer Error Channel
Requires: https://github.com/spring-cloud/spring-cloud-stream/pull/1039

Publish errors (returned and nack'd messages) to the error channel.

Add docs

Test Polishing
2017-08-22 12:36:42 -04:00
Gary Russell
8cb49f5932 GH-75: Don't Ignore User Config Errors
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/75

Instead of setting `ignoreDeclarationExceptions` in the provisioner's `RabbitAdmin`, catch
the exception in the provisioner.
Use a `DeclarationExceptionEvent` to determine that the exception was thrown in some other
admin and treat the condition as fatal.
2017-08-17 16:44:30 -04:00
Vinicius Carvalho
cbcdceb6ee Update version to 1.3.0.BUILD-SNAPSHOT 2017-07-31 15:45:38 -04:00
Vinicius Carvalho
47f870e855 Release 1.3.0.M2 2017-07-31 15:44:25 -04:00
Vinicius Carvalho
26e35e6a6f Use property to control checkstyle version 2017-07-31 15:42:10 -04:00
Marius Bogoevici
c8818978ca Update Spring Cloud Stream version to 1.3.0.BUILD-SNAPSHOT 2017-07-19 10:02:35 -04:00
Marius Bogoevici
6f8aca9465 Update version to 1.3.0.BUILD-SNAPSHOT 2017-07-19 09:55:09 -04:00
Marius Bogoevici
b44ec4f974 Release 1.3.0.M1 2017-07-19 09:49:53 -04:00
Marius Bogoevici
10b1ddb123 Update Spring Cloud Stream version to 1.3.0.M1 2017-07-19 09:46:51 -04:00
Marius Bogoevici
d5e69808b1 Remove property update for spring-cloud-stream 2017-07-17 23:28:05 -04:00