Commit Graph

8926 Commits

Author SHA1 Message Date
Venil Noronha
797e5045bf INT-4334: Adds a DirectoryScanner to RemoteFileMS
JIRA: https://jira.springsource.org/browse/INT-4334

* Add a `DirectoryScanner` setter named `setScanner` in
`AbstractInboundFileSynchronizingMessageSource` to set the
`FileReadingMessageSource`'s scanner.
* Add tests to `AbstractRemoteFileSynchronizerTests`.

Polish.

Updates xsd, tests and documentation.

Fix xsd formatting.

Addresses review comments.

* Some code style polishing
2017-09-25 21:08:51 -04:00
Gary Russell
2427a7d426 Upgrade to Reactor GA 2017-09-25 16:26:40 -04:00
Gary Russell
59781e6386 Use Explicit Module Exclusions 2017-09-25 11:57:12 -04:00
Gary Russell
bea5706e67 Fix HTTP For Latest Spring Framework
https://build.spring.io/browse/INT-FATS5IC-277/

Fix mock for request.getRawStatusCode()

4cbef27f90

Also excluded transitive SF dependencies from spring-security.
2017-09-25 10:35:08 -04:00
Venil Noronha
a65de25572 INT-4343: Add executor option to the RedisInChA
JIRA: https://jira.springsource.org/browse/INT-4343

* Add a `Executor` setter named `setTaskExecutor` in
`RedisInboundChannelAdapter` to set the container's task executor.

* Add a `task-executor` attribute to
`<int-redis:inbound-channel-adapter>`.

* Update RedisInboundChannelAdapterParser configuration validation
tests.

* Update redis.adoc and whats-new.adoc.

* Polishing according PR comments
* Improve `RedisQueueGatewayIntegrationTests` performance
2017-09-19 18:18:30 -04:00
Venil Noronha
b1865dab3a INT-4313: GemfireMetadataSt: Add Listener support
JIRA: https://jira.springsource.org/browse/INT-4313

* Add `GemfireCacheListener` in `GemfireMetadataStore` to delegate cache
events to `MetadataStoreListener`s.
* Add GemfireMetadataStore cache listener tests.
* Update ascii doc.
* Addresses review comments.
* Some polishing to Java 8 style
* Some code style polishing
* Minor Doc improvement
2017-09-18 20:58:58 -04:00
Meherzad Lahewala
40783ff547 INT-3936: GlobalChIntercep: add negative pattern
JIRA: https://jira.spring.io/browse/INT-3936

* Extract `smartMatch()` logic from the `IntegrationManagementConfigurer`
and `IntegrationMBeanExporter` into the `PatternMatchUtils` class
* Add negative (`!`) pattern matching configuration support to the
`GlobalChannelInterceptor` annotation and `<int:channel-interceptor>` component
* Code style, Docs and JavaDocs polishing
2017-09-18 13:55:00 -04:00
Gary Russell
671097fd50 INT-4312: MessagingMethodInvokerHelper Convert
JIRA: https://jira.spring.io/browse/INT-4312

If there is a single eligible method, the message content is JSON
and the method parameter doesn't match the payload, perform JSON
conversion if there is an ObjectMapper available.
2017-09-14 14:34:12 -04:00
Spring Buildmaster
c7c006e963 [artifactory-release] Next development version 2017-09-14 13:54:46 +00:00
Spring Buildmaster
d4d756fe04 [artifactory-release] Release version 5.0.0.M7 2017-09-14 13:54:40 +00:00
Gary Russell
2a2792e2b1 Version Updates for M7 2017-09-14 09:24:34 -04:00
Artem Bilan
c9b5335649 INT-4289: Fix JMS DSL generic arguments coercion
JIRA: https://jira.spring.io/browse/INT-4289,
https://jira.spring.io/browse/INT-4253

We can't use `JmsDefaultListenerContainerSpec` methods from the first
place because we have restricted argument in the `configureListenerContainer()`

* Change the generic argument of the `Consumer<>` to the inferred `S`.
This way the target `Jms.messageDrivenChannelAdapter()` usage will
provide correct `JmsListenerContainerSpec` implementation for auto-completion
2017-09-13 16:53:13 -04:00
Gary Russell
ffe2bf0d29 INT-4123: Remove Deprecations
JIRA: https://jira.spring.io/browse/INT-4123
2017-09-11 14:30:05 -04:00
Artem Bilan
5263ea6dff INT-4123: Add Prefix to the Key-Value MSs
Fixes spring-projects/spring-integration#2213
JIRA: https://jira.spring.io/browse/INT-4123

Fully different `MessageStore`s can be configured for the same shared
Key-Value data-base.
Since the retrieval logic is based on the keys, that may cause the
unexpected messages expiration via `MessageGroupStoreReaper`.

* To distinguish store instances on the shared store add `prefix`
option to the `AbstractKeyValueMessageStore`

* Deprecate the `GemfireMessageStore` `Cache`-based configuration - `setIgnoreJta()` and `afterPropertiesSet()`.
The `GemfireMessageStore` relies only on an externally configured `Region`.

**Cherry-pick to 4.3.x**

Doc Polishing
2017-09-11 14:24:33 -04:00
Artem Bilan
df55ac95d8 Fix Checkstyle violations
https://build.spring.io/browse/INT-MASTER-792
2017-09-11 13:03:39 -04:00
meherzad
defb4ff18a INT-778 Add BroadCasting tests when no handlers
JIRA: https://jira.spring.io/browse/INT-778
2017-09-11 12:51:27 -04:00
Artem Bilan
6bbcfd37fa Upgrade to SA-2.0.0.RC1 2017-09-11 11:54:47 -04:00
Philipp Etschel
1f220e0e66 INT-4340: Disable XMPP Roster properly
JIRA: https://jira.spring.io/browse/INT-4340

* Roster is now disabled on login as well
* Fixed tagging and formatting issues
* Checkstyle and documented the changed behaviour as well

Polishing: rely on the `AbstractFactoryBean.getObject()`

**Cherry-pick to 4.3.x**
2017-09-11 11:02:13 -04:00
Artem Bilan
9751608225 Upgrade SF-5.0.0.RC4, Reactor-3.1.0.RC1 2017-09-11 10:17:06 -04:00
Gary Russell
73d9c6b6c5 INT-4255: JSON Embedded Headers Message Mapper
JIRA: https://jira.spring.io/browse/INT-4255

- Support embedding headers for transports that don't support headers (TCP, Kafka, etc)
- Use the new message-aware Jackson ObjectMapper
- Provide a mechanism to more efficiently support byte[] payloads (avoid Base64 encoding)
- Support decoding "legacy" SCSt embedded headers

Polishing; PR Comments - Add Support to MQTT and TCP

Switch to simple patterns instead of regex

* Fix JavaDoc typo
* Upgrade to Jackson 2.9.1
2017-09-08 16:45:50 -04:00
Gary Russell
0d495294ed INT-4342: White List for Payload Deserializer
JIRA: https://jira.spring.io/browse/INT-4342

Use similar code to Spring AMQP to add white list support for Integration's
use of the `DeserializingMessageConverter`; introduce the `WhiteListDeserializingMessageConverter`.

Polishing

Missed this change in PR.

Fix XSD attribute
2017-09-08 15:31:47 -04:00
Artem Bilan
5749c5b237 INT-4320: Fix AMQP channels to declare on demand
JIRA: https://jira.spring.io/browse/INT-4320

To avoid "fail fast" situation when Broker isn't available during
application init phase, move all the declarations in
the AMQP Message Channels to the `ConnectionListener.onCreate()`.
In addition call the declaration from the `Lifecycle.start()`
2017-09-08 14:46:03 -04:00
Matthias Jeschke
b9c8a8edf8 INT-4341: RedisQueueIn: support receiveTimeout=0
JIRA: https://jira.spring.io/browse/INT-4341
Fixes spring-projects/spring-integration#2228

Add to the `RedisQueueInboundGateway` and `RedisQueueMessageDrivenEndpoint`support
for the `receiveTimeout` of 0 and block indefinitely

Added some simple tests to check if the receive timeout can be set to 0

**Cherry-pick to 4.3.x**
2017-09-06 17:55:06 -04:00
Artem Bilan
46de69dbf2 Honor the FluxSink State in the PollChPublisherAd
The `PollableChannelPublisherAdapter` is based on the poll model of the
`FluxSink` and iterate and poll downstream `PollableChannel` until
there is an item or `n > 0`.
Having `take(6)` we end up with the cancel from the downstream
`Subscriber` after the batch is filled, but at the same time we continue
to poll the upstream source because `n` is like `Long.MAX_VALUE`.

* The proper way to interact is check for the `!sink.isCancelled()`
as well.
This way cancelled `sink` won't "steal" data from other subscribers

Fix compatibility with the latest dependencies

* Upgrade to Gradle 4.1
* Upgrade as much dependencies as possible
* Fix MongoDB module to resolve deprecation in the latest driver
* Increase receive timeout in the `ResequencerTests`
* Restore generic argument for the method reference in the `ReactiveStreamsTests`
* Fix `WebFluxInboundEndpoint` for the compatibility with the latest Reactor API
2017-09-06 16:46:59 -04:00
Gary Russell
cfab1fb1a4 INT-4333: Don't Override Explicit Management Props
JIRA: https://jira.spring.io/browse/INT-4333

If the user has explicitly set management properties in a bean definition,
the configurer should not override those settings with defaults.
2017-09-01 15:48:11 -04:00
Gary Russell
3a2be8e9e0 INT-4336: Fix NPE in IntegrationGraphServer
JIRA: https://jira.spring.io/browse/INT-4336

Don't add "hidden" unreachable methods to the map in the `GatewayProxyFactoryBean`.
The methods can never be executed and may not have all expected properties; they
should not appear in the graph at all since they are unreachable.

Also add defensive coding to the `IntegrationGraphServer` to avoid NPEs when unexpected
conditions arise.
2017-09-01 15:44:55 -04:00
Artem Bilan
6c18cbcf57 INT-4326: Add endpoints.noAutoStartup property
JIRA: https://jira.spring.io/browse/INT-4326

To let to disable autoStartup for particular endpoint bean globally,
in one place, add `spring.integration.endpoints.noAutoStartup`
to the `spring.integration.properties`

So, now all the `AbstractEndpoint` checks that property for matching its
bean name to configure `autoStartup` property to `false`

**Cherry-pick to 4.3.x**
2017-09-01 15:14:47 -04:00
Gary Russell
34652f3342 INT-4332: Fix Test Race Condition 2017-08-23 09:52:52 -04:00
Oleg Zhurakousky
318741d1fd INT-4332 updated DSL with Supplier support
- add support for Supplier as sources of messages to the DSL
- add tests and javadocs
2017-08-22 17:08:30 -04:00
Oleg Zhurakousky
946cc229eb INT-4330: Add support for Supplier MessageSource
JIRA: https://jira.spring.io/browse/INT-4330

- updated documentation
- updated test
2017-08-17 12:01:03 -04:00
Artem Bilan
ab9e843cfa Fix Checkstyle violations
* Add `validateOnlyOverlapping = false` for `RequireThis` Checkstyle rule
* Add `this.` to caught places
* Use `CustomizableThreadFactory` instead of raw interface in the
`UnicastSendingMessageHandler`
2017-08-15 13:36:19 -04:00
Gary Russell
a1abae03a4 INT-4329: Fix JDBC [IMPORTANT] Block
JIRA: https://jira.spring.io/browse/INT-4329

Block wasn't closed.
2017-08-15 13:07:10 -04:00
Gary Russell
0a1306cd1b INT-4328: AMQP: Returns/Nacks: Create ErrorMessage
JIRA: https://jira.spring.io/browse/INT-4328

Add support for sending `ErrorMessage`s to the return and nack channels.

**cherry-pick to 4.3.x, but change default EMS to null (will require minor adjustment to test - set the EMS in `adapterWithReturnsAndErrorMessageStrategy`)**
2017-08-15 12:31:52 -04:00
Oleg Zhurakousky
d41d707357 Polishing ErrorMessageSendingRecoverer
- delegated creation of 'DefaultErrorMessageStrategy' to the
another constructor in cases where user provided null
- see https://github.com/spring-cloud/spring-cloud-stream/pull/1038#discussion_r132707905
for more details and justification

* Simple code style polishing

**Cherry-pick to 4.3.x**
2017-08-14 11:19:59 -04:00
Rick Hogge
9f4f07bcfd INT-4327: Optimize Bean Post Processors
JIRA: https://jira.spring.io/browse/INT-4327

To avoid reflection and annotation processing overhead on the bean classes
when we deal with non-singleton beans and there is really no any
messaging on the bean class, store bean classes to the local cache to skip
them in the future when `BPP` is applied for request/prototype beans

* Simple code style polishing

**Cherry-pick to 4.3.x**
2017-08-14 10:37:40 -04:00
Artem Bilan
6dad473219 Demonstrate error handling in the HttpDslTests
StackOverflow https://stackoverflow.com/questions/45627072/spring-integration-preserve-http-error-code-and-body-in-response
2017-08-11 13:45:51 -04:00
Artem Bilan
84d60f4ab4 INT-4315: Add WebFlux module
JIRA: https://jira.spring.io/browse/INT-4315

Move Reactive components outside of HTTP module to the new WebFlux one,
including XSD, tests and documentation
Make an appropriate polishing for the `http.adoc` with cross-link
to the `webflux.adoc`

Exclude transitive `spring-webmvc` for the `spring-integration-webflux`
2017-08-11 13:38:37 -04:00
Artem Bilan
4fd32d2bd4 Document max-rows-per-poll for the JDBC Gateway
StackOverflow https://stackoverflow.com/questions/45611037
2017-08-10 16:52:44 -04:00
Artem Bilan
a3160f80f6 INT-4318: Register Jackson modules if available
JIRA: https://jira.spring.io/browse/INT-4318

Do not `ObjectMApper.findAndRegisterModules()` unconditionally.
If there is no the target module library in classpath, we end up
with the `NoClassDefFoundError`

* Copy-paste the well-known modules registration logic from the
`org.springframework.http.converter.json.Jackson2ObjectMapperBuilder`
since we can't add `spring-web`  dependency to the `SI-core`
2017-08-08 13:49:50 -04:00
Artem Bilan
32fdd2119f INT-4324: File Outbound: parse preserve-timestamp
JIRA: https://jira.spring.io/browse/INT-4324

The `preserve-timestamp` attribute for the
`<int-file:outbound-channel-adapter>` has been missed for parsing in
the `FileWritingMessageHandlerBeanDefinitionBuilder` and propagation
in the `FileWritingMessageHandlerFactoryBean`

**Cherry-pick to 4.3.x**
2017-08-08 11:47:32 -04:00
Artem Bilan
2fe7289429 Redis DelayerHRescheduleIntTests: unique groupId
https://build.spring.io/browse/INT-AT42SIO-595/

To avoid clashes with other parallel builds on CI for different versions
on the same shared Redis make a testing `groupId` as unique using
`UUID.randomUUID()`

**Cherry-pick to 4.3.x & 4.2.x**
2017-08-07 12:21:20 -04:00
Artem Bilan
cb1784d978 INT-4325: Fix JpaExecutor bean registration
JIRA: https://jira.spring.io/browse/INT-4325

When channel adapter is defined without `id` attribute, the
`JpaInboundChannelAdapterParser` generates the name for class which
bean is never registered, therefore all the `JpaExecutor`s are registered
with the same bean name and afterward all the `JpaPollingChannelAdapter`
without `id` share the same `JpaExecutor`

* Generate bean name based on the `SourcePollingChannelAdapterFactoryBean`
which is used eventually for real bean registration
* Add test config for several channel adapters without `id`
* Optimize the `JpaInboundChannelAdapterParserTests` to start
the context only once during test class initialization

**Cherry-pick to 4.3.x**
2017-08-04 20:30:13 -04:00
Artem Bilan
5a259939a6 Reset AbstractMessageChannel.fullChannelName
Fixes spring-cloud/spring-cloud-stream#983

When the `AbstractMessageChannel.getFullChannelName()` is called
before the full bean initialization, we don't have the proper name any
more lately - that is only `unknown.channel.name`

* Reset `fullChannelName` property to `null` in the end of `onInit()`,
so the next `getFullChannelName()` will build the proper component name

**Cherry-pick to 4.3.x**
2017-08-04 13:19:46 -04:00
Artem Bilan
6aca63806f Upgrade to the latest SF, SS and Reactor
https://build.spring.io/browse/INT-FATS5IC-249
2017-08-03 19:23:35 -04:00
shawn-yang-1979
3fb902855e Update MqttMessageDeliveredEvent.java 2017-08-03 10:55:46 -04:00
Artem Bilan
f00eafb4f8 GH-152: Scanner & filters are mutually exclusive
Fix spring-projects/spring-integration-java-dsl#152

* Add Logic to the `FileInboundChannelAdapterSpec` do not populate
`FileListFilterFactoryBean` to the `FileReadingMessageSource`
when the `scanner` is provided.
Otherwise call the `FileReadingMessageSource` and rely on its logic to
refuse mutually exclusive `scanner` and `filter/locker` options
2017-07-31 10:52:29 -04:00
Artem Bilan
0f78d4b2ec Some JDBC tests polishing and optimization
**Cherry-pick to master**

Conflicts:
	build.gradle
	spring-integration-jdbc/src/test/java/org/springframework/integration/jdbc/store/channel/DataSource-derby-context.xml
2017-07-26 16:16:07 -04:00
Spring Buildmaster
3b03b6ac91 [artifactory-release] Next development version 2017-07-25 17:26:55 +00:00
Spring Buildmaster
5934001a62 [artifactory-release] Release version 5.0.0.M6 2017-07-25 17:26:49 +00:00
Artem Bilan
4b49c45137 Upgrade to SD Kay RC2 2017-07-25 12:50:22 -04:00