package com.emc.nautilus.demo;

import com.emc.nautilus.streaming.Producer;
import com.emc.nautilus.streaming.ProducerConfig;
import com.emc.nautilus.streaming.Stream;
import com.emc.nautilus.streaming.impl.JavaSerializer;
import com.emc.nautilus.streaming.impl.SingleSegmentStreamManagerImpl;

import lombok.Cleanup;

public class StartProducer {
	
	public static final int PORT = 12345;

	public static void main(String[] args) {
		String endpoint = "localhost";
		String streamName = "abc";
		String testString = "Hello world: ";

		SingleSegmentStreamManagerImpl streamManager = new SingleSegmentStreamManagerImpl(endpoint, PORT, "Scope1");
		Stream stream = streamManager.createStream(streamName, null);
		@Cleanup
		Producer<String> producer = stream.createProducer(new JavaSerializer<>(), new ProducerConfig(null));
		for (int i=0;i<1000;i++) {
			producer.publish("RoutingKey", testString+i+"\n");
		}
		producer.flush();
	}

}

@@ -344,49 +344,8 @@
 er %7B
-%0A%09%0A%09public static final int PORT = 12345;
 %0A%0A%09p
@@ -417,16 +417,63 @@
 lhost%22;%0A
+%09%09int port = 12345;%0A%09%09String scope = %22Scope1%22;%0A
 %09%09String
@@ -491,11 +491,15 @@
  = %22
-abc
+Stream1
 %22;%0A%09
@@ -635,22 +635,19 @@
 nt, 
-PORT, %22S
+port, s
 cope
-1%22
 );%0A%09
@@ -844,16 +844,18 @@
 0;i%3C1000
+00
 ;i++) %7B%0A
@@ -878,20 +878,12 @@
 ish(
-%22RoutingKey%22
+null
 , te

Change producer as discussed