I am trying to implement a Producer-Consumer
pattern that uses multi-agents as workers instead of multi-threads.
As I understand, a typical multi-threaded implementation uses a BlockingQueue
where one Producer
thread puts information on the Queue and have multiple Consumer
threads pull the data and execute some processing functions.
So following the same logic, my design will use a Producer
agent that generates data and sends it to multiple Consumer
Agents. At first guess, I have thought I should use a shared BlockingQueue
between the Consumer
agents and have the agents access the queue and retrieve the data. But I don't know if this is easy to do because I don't think agents have any shared memory and it is way more simple to directly send the information to the Consumer
agents as ACL Messages.
This is important to consider because my multi-agent design will process a lot of data. So my question is, in Jade, what happens if I send to many ACL messages to a single agent? will the agent ignore the other messages?
This post has an answer that suggests "..Within the JADE framework, Agents feature an 'Inbox' for ACLMessages, basically a BlockingQueue Object that contains a list of recieved messages. the agent is able to observe its own list and treat them as its lifecycle proceeds. Containers do not feature this ability...". Is that statement correct? If this is true, then the other messages are just waiting on the queue and it will be ideal for my design to send information directly to the Consumer
Agents, but I didn't see any BlockingQueues
on the ACLMessage class.