Cluster load-balancer for Oracle aq application

101 views Asked by At

I've got an application that uses Oracle AQ to process information. Messages are created based on records in database. The application loads messages to be processed and schedules them inside memory for later. The application is clustered and because of that I got three problems:

  1. Let's say there is a variable (values not constant) in message. Based on it, if there is a node processing messages with said variable, only this node should process messages with same variable value.
  2. When starting cluster node, all records (messages) that are ready to be processed should be loaded but records that are already loaded to be processed and are not processed already (scheduled) shouldn't be loaded.
  3. If one cluster node dies and it had records scheduled for processing, another node should take over the work (currently nodes have no way of knowing what other nodes have scheduled).

Seems that distributed cache like Hazelcast might not be a good idea because performance is important and there are a lot of messages involved (especially for second problem).

My questions are:

a) I couldn't find any out of the box solution for my problems, seems I need custom load-balancer?
b) If so, how should load-balancer know about the nodes, do I use another Oracle AQ queue for communication or something like Hazelcast?

1

There are 1 answers

0
noctarius On

not exactly sure I got your question but I'll try to answer.

1) What kind of variable you're speaking about, inside a value? You might want to look into the ValueExtractor (http://docs.hazelcast.org/docs/3.7/manual/html-single/index.html#implementing-a-valueextractor) and data affinity (http://docs.hazelcast.org/docs/3.7/manual/html-single/index.html#data-affinity) to make sure same "variables" stay in the same node.

2) Sorry but I don't really get this requirement. Probably you just don't want to "reload" values already in memory? That would be default behavior.

3) Starting with 3.8 there's a DurableExecutorService (http://docs.hazelcast.org/docs/latest-dev/manual/html-single/index.html#durable-executor-service) in Hazelcast, which will take care of failover for you. 3.8 was just released as early access.

Let me know if anything was misinterpreted or you have further questions.