Running Feed Simulations from the Command Line

To run a feed simulation at the command line, you must have a StreamBase Server already running. See Running Applications from the Command Line for instructions. When running StreamBase command-line utilities under Windows, be sure to open and run the commands in a StreamBase Command Prompt.

The following example starts a feed simulation with generated data. The sbfeedsim process connects to the running sbd process, reads the schemas of its inputs, and generates appropriate data. The feed simulation stops when either 1000 tuples have been generated or 120 seconds have elapsed, whichever comes first.

sbfeedsim --max-tuples 1000 --max-time 120

The feed simulation runs until one of its limit options reaches its maximum, or until you press Ctrl-C.

If you have created and saved a feed simulation file in StreamBase Studio, you can run it against your StreamBase application using the command-line sbfeedsim utility. For example, the following commands on a UNIX system start the StreamBase Server with the Best Bids and Asks sample application, and then runs the NYSE.fsbs feed simulation file provided with that sample.

cd streambase-install-dir/sample/bestbidsandaks
sbd -b BestBidsAsks.sbapp
sbfeedsim NYSE.fsbs

For Windows, open two StreamBase Command Prompt windows. Run these commands in the first window:

cd %STREAMBASE_HOME%\sample\bestbidsandasks
sbd BestBidsAsks.sbapp

Run these commands in the second window:

cd %STREAMBASE_HOME%\sample\bestbidsandasks
sbfeedsim NYSE.fsbs

If you have feed simulation files created and saved with StreamBase 3.5 or earlier, use the sbfeedsim-old command instead.

See the sbfeedsim and sbfeedsim-old reference pages for more on the sbfeedsim options.

Back to Top ^