@@ -0,0 +1,633 @@
+package com.esri.gest.test.awsiot;%0A%0Aimport com.google.common.util.concurrent.RateLimiter;%0A%0Apublic class EventsRateLimit %7B%0A%0A%09 public static int M = 1000;%0A%09 public static int N = 100;%0A%09 public static RateLimiter limiter = RateLimiter.create(N);%0A%09 public static void main(final String%5B%5D args)%0A%09 %7B%09%09%0A%09%09 String msg = null;%0A%09%09 for (int i =0; i %3C M; i++)%7B%09%09%09 %09%09%09 %0A%09%09%09 msg = String.format(%22Messsage - %25d%22, i);%0A%09%09%09  publishMessage(msg); %09%09%09%09%0A%09%09 %7D%09%09%09%09 %0A%09 %7D%0A%09 %0A%09 public static void publishMessage(String msg) %7B%0A%09%09 if(limiter.tryAcquire()) %7B%09%09%09%0A%09%09%09 System.out.println(msg);%0A%09%09 %7Delse %7B%0A%09%09      System.out.println(%22================%22);%0A%09%09 %7D%0A%09 %7D%0A%7D%0A%0A

set qos1, removed message retain