Start local test server
This function requires Streaming Data Framework for MATLAB® Production Server™ and MATLAB Compiler SDK™.
startServer( launches a local test server
(development version of MATLAB
Production Server) that simulates the production environment so that you can test event
startServer generates a MATLAB project file for the Production Server Compiler (MATLAB Compiler SDK) app. In
addition to simulating production with this file on a local test server, you can use the
generated project file to create a CTF archive.
Process Event Streams Using Local Test Server
Assume that you have a Kafka® server running at the network address
that has a topic
Also assume that you have a streaming analytic function
and a function
initRecamanSum to initialize persistent state.
KafkaStream object connected to the
ks = kafkaStream("kafka.host.com",9092,"RecamanSequence");
EventStreamProcessor object that runs the
recamanSum function, which is initialized by the
esp = eventStreamProcessor(ks,@recamanSum,@initRecamanSum);
Start the local test server, which also opens the Production Server Compiler (MATLAB Compiler SDK) app.
To use the test server, you require MATLAB Compiler SDK.
Once the app opens, you must start the test server manually.
To start the test server from the app, click Test Client and then Start. For an example on how to use the app, see Test Client Data Integration Against MATLAB (MATLAB Compiler SDK).
Navigate back to the MATLAB command prompt to start processing events.
Using the MATLAB editor, you can set breakpoints in the
function to examine the incoming streaming data when you start the server.
esp — Object to process event streams
Object to process event streams, specified as an
files — Additional files to include in archive
character vector | string scalar | string array
Additional files to include in the generated archive, specified as a character vector or string scalar for a single file, or as a string array for multiple files.
Extra files are necessary only if you plan to use the generated project file to
deploy a CTF archive to MATLAB
Production Server. For other ways to create deployable archives, see the
archive = startServer(esp,"ExtraFiles"=["data.mat",
"/schema/registry/schema.json"]) includes the files
schema.json in the generated
Introduced in R2022b