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 studio-workspace
/sample_bestbidsandaks
sbd -b BestBidsAsks.sbapp
sbfeedsim NYSE.fsbs
For Windows, open two StreamBase Command Prompt windows and navigate to the workspace location of the Best Bids and Asks sample. Run this command in the first window:
sbd BestBidsAsks.sbapp
Run this command in the second window:
sbfeedsim NYSE.fsbs
See Default Installation Directories to determine the location of your Studio workspace directory on UNIX and Windows.
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.