To run a feed simulation at the command line, you must have a StreamBase Server already running. See Running Fragments 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.
sbd -b BestBidsAsks.sbapp
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:
Run this command in the second window:
See Default Installation Directories to determine the location of your Studio workspace directory on UNIX and Windows.