api.subscribe(consumerServiceEprs[0], ">", null);
String topic = "Foo";
// if remote broker location specified, use WSMessaging publisher;
ConstructorProps props = ConstructorProps
.newProps(ConstructorConsts.ENABLE_ASYNC_PUBLISH, "false")
.set(ConstructorConsts.ENABLE_BATCH_PROVENANCE, "true")
.set(ConstructorConsts.ANNOTATIONS,
AnnotationProps.newProps(AnnotationConsts.ExperimentID,
"experiment-id-" + System.currentTimeMillis()).set(AnnotationConsts.UserDN,
"/O=IU/OU=Extreme Lab/CN=drlead"));
if (BROKER_URL != null) {
EndpointReference brokerEpr = api.createEndpointReference(BROKER_URL, topic);
props.set(ConstructorConsts.BROKER_EPR, brokerEpr.getAddress());
} else {
props.set(ConstructorConsts.PUBLISHER_IMPL_CLASS,
"org.apache.airavata.workflow.tracking.impl.publish.LoopbackPublisher");
props.set(ConstructorConsts.TOPIC, topic);
}
System.out.println(ConstructorConsts.ANNOTATIONS);
System.out.println(ConstructorConsts.KARMA_IMPL);
runSample();