We have a design challenge where the situation is as follow: There are multiple producers and multiple consumers (on same queue).
Each message represent a task with parameters that consumer needs to handle. The problem is that there are certain tasks that take lots of memory (and cpu power) which we know the consumer have no capacity to handle this. the good thing is that we know how much memory (and cpu power) it approximately can take in advance, so we could prevent a consumer taking that task and giving a change to other consumer with enough memory to handle. There is the prefetch setting but i can't see how it can configure to meet this requirement Finally I found an option to rollback a transaction, so the consumer can basically check if it has enough hardware resources to handle the task and if not rollback which retrieves the message back to queue allowing next consumer take it and so forth. Not sure if that's the right approach or there is a better way? -- Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-Dev-f2368404.html
