Task distribution using Spring JMS receiving

I am trying to receive JMS messages from an Active MQ queue. On receiving messages, they are forwarded to different servers for processing.

I want to instantiate Message Listeners with information about server it is communicating with and process status.

Using available Spring Message Listener Container Classes only a single stateless instance of Message Listener can be created which is used with multiple threads.

Is there a solution for adding multiple instances of Message Listener to Message Listener Container?

Answers


Spring's MessageListenerContainers are designed to only hold one MessageListener and run multiple threads through them, in the same way that multiple threads run through a servlet instance.

A way that you could implement what you are talking about is register the one MessageListener, and have it act as a facade to a set of other listeners that you instantiate into it, and have the facade forward requests to them.


Need Your Help

Erase data on a database column using php

php sql

Hello what i am trying to achieve is combining this line of code: This is for my user Registrar

format Strings in PHP

php string-formatting

I'm tying create a reference generator in PHP, and i need format String.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.