Create a publisher, add rows, and complete the publishing process.
- Create a publisher:
NetEspPublisher publisher = project.create_publisher(null, error);
- Connect to the publisher:
Publisher.connect(error);
- Get a stream:
NetEspStream stream = project.get_stream("WIN2", error);
- Get the Message Writer:
NetEspMessageWriter writer = publisher.get_message_writer(stream, error);
- Get and start the Row Writer, and set an opcode to insert one row:
NetEspRelativeRowWriter rowwriter = writer.get_relative_row_writer(error);
rowwriter.start_row(error);
rowwriter.set_opcode(1, error);
(Optional) If publishing in transaction mode, use these arguments to add multiple rows:
NetEspRelativeRowWriter rowwriter = writer.get_relative_row_writer(error);
for(int i=0; i<100; i++){
rowwriter.start_row(error);
//add row columns' values
rowwriter.end_row(error);
}
- Publish data:
rc = publisher.publish(writer, error);