Index: branches/thasling/DistributedGA/DistributedGA.Core/Implementation/PeerNetworkMessageHandler.cs
===================================================================
--- branches/thasling/DistributedGA/DistributedGA.Core/Implementation/PeerNetworkMessageHandler.cs	(revision 13947)
+++ branches/thasling/DistributedGA/DistributedGA.Core/Implementation/PeerNetworkMessageHandler.cs	(revision 13956)
@@ -29,15 +29,15 @@
 
 
-    public void Init(string lanIpPrefix, string contactServerUrl) {
+    public void Init(string lanIpPrefix, string contactServerUrl, string problemInstance, int messageCacheCapacity, int communicationRate) {
       try {
         ownInstance = new PeerInfo() {
           IpAddress = GetInternalIpAddress(lanIpPrefix),
           Port = 0,
-          ProblemInstance = "TestProblem"
+          ProblemInstance = problemInstance
         }; // TODO: get own peerinfo
 
         writeQueue = new SizedConcurrentQueue<byte[]>();
         readQueue = new SizedConcurrentQueue<byte[]>();
-        writeQueue.Limit = 1000;
+        writeQueue.Limit = messageCacheCapacity;
         readQueue.Limit = writeQueue.Limit;
 
@@ -47,8 +47,8 @@
 
         peerListManager = new WcfPeerListManager();
-        peerListManager.Init(ownInstance, contactServerUrl);
+        peerListManager.Init(ownInstance, contactServerUrl, communicationRate);
 
         sender = new WcfMessageSender();
-        sender.Init(ownInstance);
+        sender.Init(ownInstance, messageCacheCapacity);
 
       }
@@ -141,4 +141,5 @@
           }
         }
+      
       }
     }
Index: branches/thasling/DistributedGA/DistributedGA.Core/Implementation/TestPeerListManager.cs
===================================================================
--- branches/thasling/DistributedGA/DistributedGA.Core/Implementation/TestPeerListManager.cs	(revision 13947)
+++ branches/thasling/DistributedGA/DistributedGA.Core/Implementation/TestPeerListManager.cs	(revision 13956)
@@ -34,4 +34,12 @@
             
         }
+
+        #region IPeerListManager Members
+
+        public void Init(PeerInfo source, string contactServerUrl, int communicationRate) {
+          throw new System.NotImplementedException();
+        }
+
+        #endregion
     }
 }
Index: branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageSender.cs
===================================================================
--- branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageSender.cs	(revision 13947)
+++ branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageSender.cs	(revision 13956)
@@ -20,8 +20,8 @@
     private Object timerLock = new Object();
 
-    public void Init(PeerInfo source) {
+    public void Init(PeerInfo source, int messageCacheCapacity) {
       myself = source;
       bufferedMessages = new SizedConcurrentQueue<KeyValuePair<PeerInfo, byte[][]>>();
-      bufferedMessages.Limit = 100000;
+      bufferedMessages.Limit = messageCacheCapacity;
       timer = new Timer(1000 * 60); //each 5 minutes
       timer.Elapsed += GenerateSendingTasks;
@@ -72,4 +72,5 @@
       }
     }
+
   }
 }
Index: branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageService.cs
===================================================================
--- branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageService.cs	(revision 13947)
+++ branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfMessageService.cs	(revision 13956)
@@ -11,5 +11,5 @@
     public event EventHandler<MessageRecieveEventArgs> OnDataRecieved;
 
-    private static ManualResetEvent _ResetEvent = new ManualResetEvent(false);
+    private ManualResetEvent _ResetEvent = new ManualResetEvent(false);
 
     private IMessageContract messageContract = null;
Index: branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfPeerListManager.cs
===================================================================
--- branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfPeerListManager.cs	(revision 13947)
+++ branches/thasling/DistributedGA/DistributedGA.Core/Implementation/WcfPeerListManager.cs	(revision 13956)
@@ -24,6 +24,9 @@
     private IContactService heartbeatClient;
 
-    public void Init(PeerInfo source, string contactServerUrl) {
+    private int communicationRate; //how many peers are contacted by this peer in percent
+
+    public void Init(PeerInfo source, string contactServerUrl, int communicationRate) {
       serverString = contactServerUrl;
+      this.communicationRate = communicationRate;
       myself = source;
       //Init ChannelFactory and Clients
@@ -69,5 +72,5 @@
     private List<PeerInfo> ChoosePeersForMessaging(List<PeerInfo> allPeers) {
       //communicate with 10% of the network
-      int noOfPeers = allPeers.Count / 10;
+      int noOfPeers = allPeers.Count / (100 /communicationRate);
       List<int> indexList = GetRandomItemIndexes(noOfPeers, 0, allPeers.Count - 1);
       List<PeerInfo> res = new List<PeerInfo>();
