Publish JSON Events into 1 or more Streams. This is a test harness to publish events for testing
Stream names are expected to following a specific naming convention i.e. "Events0", "Events1" etc. It is assumed they have been previously created. Subject names for the Streams are assumed to follow a similar naming convention i.e. "Events0.>", "Events1.>"
Gradle command to build "gradlew clean build fatJar." This will create an uber jar that can be deployed.
Usage:
java -jar PublishEventsToNats-1.0-SNAPSHOT.jar -mc=1000 -streams=3 -timeId=66 -useId=22 -group=1 -s=altdb01-eh-nats:4222 -tst=publishAllStreams
"-mc" command line argument is the Message count or number of messagew you want added to each stream.
"-stream" command line argument is number of streams you require the number messages to be added to. Default is 1 i.e. to stream Events0. Assumed the following naming convention "Events0", "Events1" etc.
"-timeId" command line argument defines value of "timeId" JSON attribute to used in the JSON event to be sent to NATS.
"-useId" command line argument defines value of "useID" JSON attribute to use in the JSON event to be sent to NATS.
"-group" command line argument defines value of "group" attribute to use in the JSON event to be sent to NATS.
"-s" command line argument defines the NATS service or host endpoint either the k8s service or hostname.
"-tst" is the actual test or command to be executed. Currently only "publishAllStreams" is supported.
Note: The autogenerated JSON event "root customer ID hash" attribute is a randomly generated number (0-255) added to the JSON event. The Subject line for each message added to NATS will be randomly generated as follows, literal string matching the stream name e.g. "Events0.", with a random integer (0-60000) appended to this literal e.g. "Events0.25409" or "Events1.967", "Events3.9986"