Publishing

Create a publisher, add rows, and complete the publishing process.

  1. Create a publisher:
    NetEspPublisher publisher = project.create_publisher(null, error);
  2. Connect to the publisher:
    Publisher.connect(error);
  3. Get a stream:
    NetEspStream stream = project.get_stream("WIN2", error);
  4. Get the Message Writer:
    NetEspMessageWriter writer = publisher.get_message_writer(stream, error);
  5. 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);
    }
  6. Publish data:
    rc = publisher.publish(writer, error);