What is a Minions Boss in Commerce Engine?

When you look at the Commerce Engine minions environment json config, you might notice an interesting policy called the MinionBossPolicy which looks like this:

commerceegngin_minionsbosspolicy

You might have wondered to yourself- what the #!@$# is a Minions Boss Policy?

Boss Minion

As the name suggests, a boss minion is a minion that tells other worker minions what to do. It delegates work. As you know, a minion usually watches and process a list. Having a boss minion, allows work to be distributed between other minions so that, allowing for scaling.

In the example above, a boss minion called PendingOrdersMinionBoss is configured via a MinionBossPolicyto distribute workload between two other minions of type PendingOrdersMinion so that each PendingOrdersMinion processes separate pending order lists (PendingOrders.1 & PendingOrders.2). This allows for concurrent processing of lists and can be scaled to add more worker minions as required under the boss minion.