This commit is contained in:
Sreeram Garlapati 2016-01-22 09:47:34 -08:00
Родитель 37bc6bcd9c
Коммит adc21c625d
4 изменённых файлов: 4 добавлений и 17 удалений

Просмотреть файл

@ -17,8 +17,7 @@ public class ReceiveByDateTime
public static void main(String[] args)
throws ServiceBusException, ExecutionException, InterruptedException, IOException
{
ConnectionStringBuilder connStr = new ConnectionStringBuilder("firstehub-ns", "gojavago", "RootManageSharedAccessKey", "LHbmplGdVC7Lo7A1RAXXDgeHSM9WHIRvZmIt7m1y5w0=");
// ConnectionStringBuilder connStr = new ConnectionStringBuilder("----namespaceName-----", "----EventHubName-----", "-----sayKeyName-----", "---SasKey----");
ConnectionStringBuilder connStr = new ConnectionStringBuilder("----namespaceName-----", "----EventHubName-----", "-----sayKeyName-----", "---SasKey----");
EventHubClient ehClient = EventHubClient.createFromConnectionString(connStr.toString()).get();

Просмотреть файл

@ -16,12 +16,7 @@ public class Send
public static void main(String[] args)
throws ServiceBusException, ExecutionException, InterruptedException, IOException
{
String username = "RootManageSharedAccessKey";
String password = "LHbmplGdVC7Lo7A1RAXXDgeHSM9WHIRvZmIt7m1y5w0=";
String namespaceName = "firstehub-ns";
ConnectionStringBuilder connStr = new ConnectionStringBuilder(namespaceName, "gojavago", username, password);
// ConnectionStringBuilder connStr = new ConnectionStringBuilder("----namespaceName-----", "----EventHubName-----", "-----sayKeyName-----", "---SasKey----");
ConnectionStringBuilder connStr = new ConnectionStringBuilder("----namespaceName-----", "----EventHubName-----", "-----sayKeyName-----", "---SasKey----");
Gson gson = new GsonBuilder().create();
@ -44,12 +39,6 @@ public class Send
System.out.println(Instant.now() + ": Send Complete...");
System.in.read();
while(true){
sender.send(sendEvent).get();
System.out.println(Instant.now() + ": re-Send Complete...");
System.in.read();}
}
/**

Просмотреть файл

@ -15,8 +15,7 @@ public class SendBatch
public static void main(String[] args)
throws ServiceBusException, ExecutionException, InterruptedException, IOException
{
ConnectionStringBuilder connStr = new ConnectionStringBuilder("firstehub-ns", "gojavago", "RootManageSharedAccessKey", "LHbmplGdVC7Lo7A1RAXXDgeHSM9WHIRvZmIt7m1y5w0=");
// ConnectionStringBuilder connStr = new ConnectionStringBuilder("----namespaceName-----", "----EventHubName-----", "-----sayKeyName-----", "---SasKey----");
ConnectionStringBuilder connStr = new ConnectionStringBuilder("----namespaceName-----", "----EventHubName-----", "-----sayKeyName-----", "---SasKey----");
Gson gson = new GsonBuilder().create();

Просмотреть файл

@ -22,7 +22,7 @@ public abstract class TestBase
public static TestEventHubInfo checkoutTestEventHub()
{
HashMap<String, String> sasRule = new HashMap<String, String>();
sasRule.put(TestBase.SasRuleName, "LHbmplGdVC7Lo7A1RAXXDgeHSM9WHIRvZmIt7m1y5w0=");
sasRule.put(TestBase.SasRuleName, "---------SasKey-----------");
return new TestEventHubInfo("gojavago", "firstehub-ns", null, sasRule);
}