[jboss-user] [Messaging, JMS & JBossMQ] - Re: Joining messages (queues)
do-not-reply at jboss.com
Sat Feb 3 20:50:27 EST 2007
"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.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4010609#4010609
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4010609
More information about the jboss-user