Commit Graph

158 Commits

Author SHA1 Message Date
Gary Russell
dd5c8c2dec GH-156: Fix outbound contentType
Fixes https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/156

The `SimpleMessageConverter` overwrote the `contentType` property with `application/octet-stream`.

`contentType` set by the stream converter should win.

- `setHeadersMappedLast(true)`
- replace the converter with a simple `byte[]` pass-through converter on both sides.
- if (for some reason) the stream converter produces something other than `byte[]` fall back to
the `SimpleMessageConverter`.
- remove the `afterPropertiesSet` since it's done by the abstract binder.

**cherry-pick to 2.0.x**
Resolves #157
2018-06-12 13:54:46 -04:00
Gary Russell
5a95735615 GH-152: Inject nullChannel for confirm acks
Fixes https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/152

Reduce log noise since we only express interest in nacks.
2018-05-23 12:21:32 -04:00
Oleg Zhurakousky
a8bf0e8a09 GH-149 Code restructuring/refactoring
Resolves #150
2018-05-21 12:14:08 +02:00
Gary Russell
4a4c88f228 GH-149: Support multiplexed consumers
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/149

When a consumer is multiplexed, configure the container to listen to multiple queues.
Not currently supported for the polled consumer.

When using a DLQ, determine the routing key from the queue in the failed message (unless
an explicit DLQ name has been provisioned - in which case, the same DLQ will be used
for all queues.
2018-05-14 17:04:36 -04:00
Soby Chacko
2f08c0f7cc Update spring-cloud-stream to 2.1.0 snapshot 2018-05-01 13:29:01 -04:00
Oleg Zhurakousky
fa6a9e35d2 Post-release update to 2.1.0.BUILD-SNAPSHOT 2018-04-06 15:28:54 -04:00
Oleg Zhurakousky
7173b77a25 2.0.0.RELEASE 2018-04-06 14:21:56 -04:00
Soby Chacko
80afaebffc 2.0 release updates 2018-04-06 13:02:08 -04:00
Gary Russell
11ba938f11 GH-143: Consumer/Producer properties javadocs
Fixes https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/143

Resolves #143
Resolves #144
2018-04-01 12:00:28 -04:00
Oleg Zhurakousky
854e922f32 GH-141 Fixed DLQ vs local handler inconsistencies
Given that is already checking for `properties.getExtension().isRepublishToDlq()` removing the IF from the configuration phase of the adapter with RetryTemplate ensures the consistency of the behavior for cases when local error handler is configured and RetryTemplate is used.

Resolves #141
2018-03-29 12:55:17 -04:00
Jay Bryant
0c6bc82fff Full editing pass for Spring Cloud Stream Rabbit Binder
I corrected grammar and spelling and edited for a corporate voice. I also add a
link or two.

Resolves #140
2018-03-21 10:59:21 -04:00
Soby Chacko
4ff8abb756 Back to 2.0.0.BUILD-SNAPSHOT 2018-03-12 16:33:31 -04:00
Soby Chacko
43fae2d697 2.0.0.RC3 Release 2018-03-12 15:32:42 -04:00
Gary Russell
4b36d1cb0d Fix broker cleanup after tests
- `RabbitBinderTests` automatically clean up but remove declaration of an unused queue
- `RabbitBinderModuleTests` didn't clean up properly.

Resolves #138
2018-03-10 10:59:20 -05:00
Gary Russell
79a42e33ae SCST-GH-1260: Binder Doc Polishing
Fixes https://github.com/spring-cloud/spring-cloud-stream/issues/1260

Resolves #137
2018-03-10 10:55:06 -05:00
Gary Russell
e21d2642e3 Polishing and tests.
Resolves #136
2018-03-07 15:00:49 -05:00
Gary Russell
26f27909b8 GH-133: Add connection name prefix property
Fixes https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/133
2018-03-07 15:00:31 -05:00
Gary Russell
bdfd4a89eb GH-134: Propagate the event publisher to container
Fixes https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/134

Requires https://github.com/spring-cloud/spring-cloud-stream/pull/1282

Resolves #135
2018-03-07 14:35:21 -05:00
Soby Chacko
fe2a099e5b Next version: 2.0.0.BUILD-SNAPSHOT 2018-03-01 09:33:38 -05:00
Soby Chacko
425e6d4156 2.0.0.RC2 Release 2018-03-01 09:22:49 -05:00
Gary Russell
f7446deddb GH-130: Remove producerConnectionFactory
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/130

Remove the creation of a separate `producerConnectionFactory`; use the `RabbitTemplate`'s
built-in 'usePublisherConnection` instead.

Fix `Duration` retry properties.
2018-02-27 11:49:26 -05:00
Oleg Zhurakousky
306796c8d9 GH-1211 made Actuator optional 2018-02-26 23:01:25 -05:00
Soby Chacko
6398efbccf Next update: 2.0.0.BUILD-SNAPSHOT 2018-02-23 12:56:23 -05:00
Soby Chacko
b023c719ef 2.0.0.RC1 Release 2018-02-23 12:35:21 -05:00
Gary Russell
09a3d4b4a8 GH-128: Fix connection factory destruction
Fixes https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/128

The binder incorrectly shuts down the connection factory `@Bean`, before the bindings
are stopped, preventing the container waiting for tasks to complete.

Code was added to destroy the CF in the case where we create one locally, which is
correct, but we should not destroy the CF managed by Spring.

Also see https://jira.spring.io/browse/AMQP-800

(cherry picked from commit eaad4d9)
2018-02-22 12:30:50 -05:00
Gary Russell
8ff1fb1513 GH-89: Clarify adminAddresses and nodes Properties
Fixes https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/89

* Remove double slashes in the URL
2018-02-08 17:56:04 -05:00
Soby Chacko
344a3d9404 Back to 2.0.0.BUILD-SNAPSHOT 2018-02-05 14:00:44 -05:00
Soby Chacko
f717c5335a Update for 2.0.0.M4 Release 2018-02-05 13:46:26 -05:00
Soby Chacko
d628f15b8c Doc structure changes
Introduce a top level doc that aggregates various sub docs
2018-02-05 13:00:02 -05:00
Oleg Zhurakousky
b73507df03 fixed RabbitBinderTest to accomodate DefaultPollableMessageSource's signature change 2018-02-04 13:29:40 -05:00
Artem Bilan
0df3195138 Move spring-integration-test into the test scope 2018-01-26 15:01:54 -05:00
Gary Russell
004b3eafba GH-121: Add Pollable Consumer
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/121
Resolves #125
2018-01-22 11:29:44 -05:00
Gary Russell
100f7749ce Doc Fix
Fixes #123
2018-01-15 11:18:26 -05:00
Artem Bilan
411816f4a9 Fix testCloudProfile to connect to "localhost"
When we don't specify the `host` property for the
`CachingConnectionFactory`, it is selected by the
`InetAddress.getLocalHost().getHostName()`, which might not be
"localhost" as it is allowed for the `guest` user on RabbitMQ.
This also may cause some unexpected loop-backs on the network interface
during connection attempt

**Cherry-pick to 1.3.x**
2018-01-10 16:06:58 -05:00
Artem Bilan
cc354cbd7d Fix CCF addresses population in Cloud profile
The Spring Boot's `RabbitProperties` populates the `host:port`
(default values) to the addresses property in the `determineAddresses()`.
This way we override provided by Cloud Connectors `host:port`

* Do not populated `addresses` to the CCF from the `RabbitProperties`
if the real `addresses` is null.
Only explicit `spring.rabbitmq.addresses` application property will have
effect

**Cherry-pick to 1.3.x**
2018-01-03 10:14:05 -05:00
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