-
Notifications
You must be signed in to change notification settings - Fork 41k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce PollerMetadataCustomizer for customizing Spring Integration's PollerMetadata #44534
Comments
Can you advise here please, @artembilan? |
Thank you for the sample!
Not sure what that means, but that is not related to the subject. So, in debug I see that Spring Batch bean:
Creates a
This endpoint still uses only one thread from that
Which means: start a new poll after one second when previous has been finished. So, to summarize your concern regarding When I added this property:
and waited long enough for the application to run, I can see this:
That means that auto-configured I'm not good with Spring Batch, but looks like the processing is blocked in one of those Now about The workaround is like this for your Spring Batch application, @quaff :
And logs are like this:
Sorry for a long coment: just wanted to clear things up! |
It may caused by existing container having same name, It works for me.
It's not related to Spring Batch, I added delay in processor for demonstration.
It works like a charm, thank you very much! @artembilan |
This comment has been minimized.
This comment has been minimized.
Thanks very much, @artembilan. To confirm my understanding, are you proposing that we update the auto-configured |
Forgot to mention. Having that in mind I looked into your application one more time.
So, in the end that is going to be
So, if we are going to have
That means start
So, the message consumed from the Kafka topic is going to be processed in the same thread.
So, all of them are really executed in parallel, and that is done in threads from Kafka listener container. Either way, I think having auto-configuration property for poller's executor still make sense. |
That is not correct, @quaff .
The rest messages in that sequence are sent to Kafka for already initialized producer. Let's concentrate in this issue for the mentioned auto-configuration property for Spring Integration |
…pplication-task-executor" Fix spring-projectsGH-44534 Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
…pplication-task-executor" Fix spring-projectsGH-44534 Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
I'm not 100% sure about the proposed configuration property as it feels a bit unusual in a Spring Boot context. There are also precedents elsewhere in Spring for components picking up an executor based on bean name without Boot being involved. Some existing cases:
Given these existing cases, I would prefer to avoid the proposed configuration property if we can. If customising the poller's executor is a common need, perhaps it could offer automatic support as Framework's |
Thank you for summarizing existing solutions, @wilkinsona ! Unfortunately this Sure! I'm also not very happy with the configuration property proposal. I see that we have more options there which cannot be covered by simple configuration properties:
Please, let us know if you agreed, @wilkinsona , and that @quaff should rework his PR respectively. |
I prefer to |
Thanks, @quaff. Yeah, I think the customizer's a good idea. As @artembilan points out, there are two other options that are also unsuited to configuration properties and a customiser would take care of all three. |
Fix spring-projectsGH-44534 Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
Fix spring-projectsGH-44534 Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
I created a simple Spring Boot demo project for testing remote partitioning with spring-integration-kafka, I found that partition steps are executed sequentially:
I'd like they are executed concurrently to reduce total execute time, It doesn't work even I configured
spring.task.scheduling.pool.size > 1
, becausetaskScheduler
inIntegrationAutoConfiguration.IntegrationTaskSchedulerConfiguration
is not used by default poller.I'm beginner of Spring Integration, not sure it's overlooked or intentional.
Here is the demo project: batch-demo.zip
The text was updated successfully, but these errors were encountered: