INT-3657: Default MaxMessPerPoll=1 for @InboundCA

JIRA: https://jira.spring.io/browse/INT-3657

With XML/DSL, the MMPP defaults to 1 (via the SPCAFB) but
@InboundChannelAdapter defaulted to -1 (infinity).

Change the annotation to be consistent with the XML/DSL.

Add missing schema docs for the `basePollerType`.

* Fix `AbstractMethodAnnotationPostProcessor` for `maxMessagesPerPollValue` override
* Change `EnableIntegrationTests#foo()` `@InboundChannelAdapter` to use `maxMessagesPerPoll = "2"`
and modify appropriate test-case to be sure that `maxMessagesPerPoll` isn't overriden as it has been done in the original commit.
This commit is contained in:
Gary Russell
2015-02-27 11:26:55 -05:00
committed by Artem Bilan
parent 14a5e1f9c5
commit 29e65e68af
9 changed files with 74 additions and 16 deletions

View File

@@ -74,6 +74,7 @@ public class StoredProcJavaConfigTests {
Collection<?> primes = (Collection<?>) received.getPayload();
assertThat(primes, Matchers.<Object>contains(2, 3, 5, 7));
received = fooChannel.receive(100);
// verify maxMessagesPerPoll == 1
assertNull(received);
}
@@ -87,7 +88,7 @@ public class StoredProcJavaConfigTests {
}
@Bean
@InboundChannelAdapter(value = "fooChannel", poller = @Poller(fixedDelay="5000", maxMessagesPerPoll = "1"))
@InboundChannelAdapter(value = "fooChannel", poller = @Poller(fixedDelay="5000"))
public MessageSource<?> storedProc() {
StoredProcPollingChannelAdapter source = new StoredProcPollingChannelAdapter(storedProcExecutor());
source.setExpectSingleResult(true);