Commit Graph

126 Commits

Author SHA1 Message Date
Soby Chacko
91cefc4d38 Next update version: 2.1.0.BUILD-SNAPSHOT 2018-09-21 11:40:10 -04:00
Soby Chacko
6352426b4f 2.1.0.M3 Release 2018-09-21 11:09:18 -04:00
Gary Russell
75ebb08479 GH-176: Add DLX Provisioning Flexibility
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/176
Resolves #177

- Add `declareDlx` to suppress declaration of DLX
- Add `deadLetterExchangeType` to allow specification of the type
2018-09-21 11:47:33 +02:00
Oleg Zhurakousky
1f5d2ad643 Matching core's GH-1485 changes 2018-09-19 11:27:19 +02:00
Oleg Zhurakousky
7d39e0ccf9 Updating with changes related to core GH-1484
Resolves #175
2018-09-19 10:43:29 +02:00
Soby Chacko
bf26977d7f Extended default properties
Allow applications to configure default values for extended prducer and
consumer properties across multiple bindings in order to avoid repetition.

Requires https://github.com/spring-cloud/spring-cloud-stream/pull/1477
2018-09-17 23:45:41 -04:00
Oleg Zhurakousky
3b2b388d76 GH-1457 fixed property names in conditionals 2018-09-13 15:43:39 +02:00
Gary Russell
5e8e3468af GH-1459: Pollable Consumer and Requeue
Resolves https://github.com/spring-cloud/spring-cloud-stream/issues/1459

Requires https://github.com/spring-cloud/spring-cloud-stream/pull/1467
2018-09-10 17:47:30 +02:00
Soby Chacko
79761444bb Next update version: 2.1.0.BUILD-SNAPSHOT 2018-08-28 10:18:41 -04:00
Soby Chacko
f737f28c91 2.1.0.M2 Release 2018-08-28 10:08:04 -04:00
Gary Russell
4c52585c5e GH-167: Upgrade to spring-cloud-build 2.1.0 snap
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/167
2018-08-08 10:41:10 -04:00
Gary Russell
e104de2204 GH-164: Add consumerTagPrefix property
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/164

Resolves #165
2018-07-25 20:48:49 +02:00
Soby Chacko
2fdfc66214 Next update version: 2.1.0.BUILD-SNAPSHOT 2018-06-27 15:41:25 -04:00
Soby Chacko
415e24a04d 2.1.0.RELEASE 2018-06-27 14:15:43 -04:00
Oleg Zhurakousky
dd6eaba70f GH-139 polishing based on changes in cire GH-1399
Resolves #139
Resolves #145
2018-06-26 12:10:31 -04:00
Gary Russell
f7f801d0ee GH-139: Advanced listener container configuration
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/139

Allow configuration of listener container properties that are not exposed as binding
or binder properties.
2018-06-26 12:10:31 -04:00
Gary Russell
95c2f7ee49 GH-155: Support overflowBehavior
Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-rabbit/issues/155

Add `overFlowBehavior` and `dlqOverflowBehavior` queue properties.

Resolves #158
2018-06-12 14:43:26 -04:00
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
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
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
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
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
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
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
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
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