diff --git a/.gitattributes b/.gitattributes
index 492376a178234143900b7631e730be06b34ed01a..2831904f228c316294172d750d9d4248f8a3e0e9 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -4981,10 +4981,10 @@ SAS/ResourceAssignment/QPIDInfrastructure/CMakeLists.txt -text
 SAS/ResourceAssignment/QPIDInfrastructure/README -text
 SAS/ResourceAssignment/QPIDInfrastructure/bin/CMakeLists.txt -text
 SAS/ResourceAssignment/QPIDInfrastructure/bin/addtoQPIDDB.py -text
-SAS/ResourceAssignment/QPIDInfrastructure/bin/cep4_config.sh -text
 SAS/ResourceAssignment/QPIDInfrastructure/bin/compareQPIDwithDB.py -text
 SAS/ResourceAssignment/QPIDInfrastructure/bin/configQPIDfromDB.py -text
 SAS/ResourceAssignment/QPIDInfrastructure/bin/gatherfrombrokers.sh -text
+SAS/ResourceAssignment/QPIDInfrastructure/bin/populateDB.sh -text
 SAS/ResourceAssignment/QPIDInfrastructure/bin/qpidinfra_dump.sql -text
 SAS/ResourceAssignment/QPIDInfrastructure/bin/route_to_struct.py -text
 SAS/ResourceAssignment/QPIDInfrastructure/lib/CMakeLists.txt -text
diff --git a/SAS/ResourceAssignment/QPIDInfrastructure/bin/cep4_config.sh b/SAS/ResourceAssignment/QPIDInfrastructure/bin/cep4_config.sh
deleted file mode 100755
index 901b43b95a3e674bb2f55a7b4d5ee4b465cb67c2..0000000000000000000000000000000000000000
--- a/SAS/ResourceAssignment/QPIDInfrastructure/bin/cep4_config.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/bash
-
-for tnode in head{01..02}.cep4.lofar
-do
-for fnode in cpu{01..50}.cep4.lofar
-do
-    ./addtoQPIDDB.py -b $fnode -q lofar.task.feedback.dataproducts -f $tnode -e lofar.default.bus
-done
-./addtoQPIDDB.py -b$tnode -q lofar.task.feedback.dataproducts -f ccu001.control.lofar -e lofar.default.bus
-done
-
-
diff --git a/SAS/ResourceAssignment/QPIDInfrastructure/bin/populateDB.sh b/SAS/ResourceAssignment/QPIDInfrastructure/bin/populateDB.sh
new file mode 100755
index 0000000000000000000000000000000000000000..6e2edc7f80231e7e60eca099572966ced12eb87b
--- /dev/null
+++ b/SAS/ResourceAssignment/QPIDInfrastructure/bin/populateDB.sh
@@ -0,0 +1,55 @@
+#!/bin/bash
+
+PROD=false
+
+# Define systems to use
+if $PROD; then
+  CCU=ccu001.control.lofar
+  MCU=mcu001.control.lofar
+  SCU=scu001.control.lofar
+else
+  CCU=ccu099.control.lofar
+  MCU=mcu099.control.lofar
+  SCU=scu099.control.lofar
+fi
+
+# -----------------------------------------
+#   Queues for processing feedback
+# -----------------------------------------
+
+# cpuXX.cep4 -> headXX.cep4 -> ccu001
+for tnode in head{01..02}.cep4.control.lofar
+do
+  for fnode in cpu{01..50}.cep4.control.lofar
+  do
+    addtoQPIDDB.py --broker $fnode --queue lofar.task.feedback.dataproducts --federation $tnode
+    addtoQPIDDB.py --broker $fnode --queue lofar.task.feedback.processing --federation $tnode
+    addtoQPIDDB.py --broker $fnode --queue lofar.task.feedback.state --federation $tnode
+  done
+
+  addtoQPIDDB.py --broker $tnode --queue lofar.task.feedback.dataproducts --federation $CCU
+  addtoQPIDDB.py --broker $tnode --queue lofar.task.feedback.processing --federation $CCU
+  addtoQPIDDB.py --broker $tnode --queue lofar.task.feedback.state --federation $CCU
+done
+
+# -----------------------------------------
+#   Exchanges for ResourceAssignment
+# -----------------------------------------
+addtoQPIDDB.py --broker $SCU --exchange lofar.ra.command
+addtoQPIDDB.py --broker $SCU --exchange lofar.ra.notification
+addtoQPIDDB.py --broker $SCU --exchange lofar.otdb.command
+addtoQPIDDB.py --broker $SCU --exchange lofar.otdb.notification
+addtoQPIDDB.py --broker $SCU --exchange lofar.ssdb.command
+addtoQPIDDB.py --broker $SCU --exchange lofar.ssdb.notification
+
+# cpuXX.cep4 -> headXX.cep4 -> scu001
+for tnode in head{01..02}.cep4.control.lofar
+do
+  for fnode in cpu{01..50}.cep4.control.lofar
+  do
+    addtoQPIDDB.py --broker $fnode --exchange lofar.otdb.command --federation $tnode
+  done
+
+  addtoQPIDDB.py --broker $tnode --exchange lofar.otdb.command --federation $SCU
+done
+