Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8285343
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:26:46+00:00 2026-06-08T11:26:46+00:00

I have a queue channel, and a service activator with a poller which reads

  • 0

I have a queue channel, and a service activator with a poller which reads from that queue. I’d like to have configuration to say “I want 50 threads to poll that queue, and each time you poll and get a message back, on this thread, invoke the service the service-activator points to.”

The service has no @Async annotations, but is stateless and safe to run in a concurrent fashion.

Will the below do that? Are there other preferred ways of achieving this?

<int:channel id="titles">
    <int:queue/>
</int:channel>

<int:service-activator output-channel="resolvedIds" ref="searchService" method="searchOnTitle" input-channel="titles">
    <int:poller fixed-delay="100" time-unit="MILLISECONDS" task-executor="taskExecutor"></int:poller>
</int:service-activator>

<task:executor id="taskExecutor" pool-size="50" keep-alive="120" />
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T11:26:47+00:00Added an answer on June 8, 2026 at 11:26 am

    Yes I think it does what you want. Once you introduce a QueueChannel the interaction becomes async – you don’t need @Async. If you don’t explicitly set up a poller it will use the default poller.

    What you have outlined is the best way to achieve it. You might also consider putting a limit on the queue size – so that in case there is a lag in keeping up with the producer it doesn’t lead to out of memory issue. If a size is specified then the send calls on the channel will block – acting as a throttle.

    The configuration you have will work as you expect. The only issue is that once you start creating executors and pollers for each end point it becomes difficult to figure out the optimal configuration for the entire application. It is ok to do this kind of optimization for a few specific steps – but not for all the endpoints (nothing in you questions suggests that you are doing it, just thought that I will raise it anyway.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Windows Service that retrieves messages from a RabbitMQ queue. The service
We have an application that reads XML from a message queue and writes to
I have a queue structure that is being used by several pthreads. The threads
I have a workflow that I want to looks something like this: / Worker
We have a queue which contains only a single integer say a. Now this
I have queue from struct type struct test { int numbers; }; queue<test> q;
I have a Queue that contains a collection of objects, one of these objects
I have a queue of users(string of emails) a in c# and I want
I have a queue of text messages in Redis. Let's say a message in
in my winforms app, I have a Queue which contains objects: Queue<MyObj> _queuedRows =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.