This content has been marked as final.
Show 3 replies
-
1. Re: Joining messages (queues)
obfuscator Jan 29, 2007 3:01 PM (in response to obfuscator)Anyone?
I'll try to be more clear:
*How do I wait for messages from more than one queue before starting processing? -
2. Re: Joining messages (queues)
byorn Jan 30, 2007 12:33 AM (in response to obfuscator)How does the MDB know the resouce is ready ???
You could use a scheduled task to execute every 5 seconds (n minutes) to check the resource. -
3. Re: Joining messages (queues)
obfuscator Feb 3, 2007 8:50 PM (in response to obfuscator)"Byorn" wrote:
How does the MDB know the resouce is ready ???
You could use a scheduled task to execute every 5 seconds (n minutes) to check the resource.
I have a fixed number of resources (servers) set up, and put them in a queue. They are available as long as I don't use them...
Anyway, I'm not going to leave this thread dead, and I came up with a solution... To clear things up, this is what I was trying to acheive:
I had several servers waiting to process compression jobs(compress videos). These were accessible through webservice-interfaces.
Initially, I set up a queue of available webservice endpoints, and had a MDB listening to that queue. When a server became available (MDB.onMessage()), I waited for a compression job (from another queue) to become available (through MessageConsumer.receive()), and then processed that job with the available server.
The problem whas that JBoss disliked this, as I was locking the MDB thread waiting for the next job.
Since I could not come up with a good solution for this scenario, I decided to install a JMS client on each of the compression servers. This allowed me to connect an MDB from each of the servers to the job queue.
Despite the problem of installing a JMS client on every compression server, this was the only reasonable way I came up with to tackling this usecase. If anyone has any ideas on how to solve this without installing the JMS client on every compression server, I'd be very glad.
Regards
/Alex