javaagents-jade

Jade Messaging Queue - Eclipse


How I would like to change these parameters from eclipse (not using command line):

jade_core_messaging_MessageManager_poolsize
jade_core_messaging_MessageManager_maxqueuesize
jade_core_messaging_MessageManager_deliverytimethreshold

The first changes the number of threads that handle the queue size, the second changes the max queue size of the received ACL messages, and finally the last changes when to print a warning when the delivery time threshold is exceeded.

bests,


Solution

  • If you start your container and agents programmatically, then something like this

        jade.core.Runtime rt = jade.core.Runtime.instance();
    
        Properties properties = new Properties();
        properties.put("local-port", "8858");
        properties.put("port", "8858");
        properties.put("host", "127.0.0.1");
        properties.put("local-host", "127.0.0.1");
        .... other parameters
        properties.put("jade_core_messaging_MessageManager_poolsize", "100");
    
        ProfileImpl p = new ProfileImpl(properties);
        rt.setCloseVM(true);
        AgentContainer agentContainer = rt.createMainContainer(p);
    
        AgentController ac = agentContainer.createNewAgent("YourAgent", YourAgent.class.getName(), new Object[]{});
        ac.start();