Simulate Events for a Persisted Event Stream
Event simulation involves creating events in a predefined event stream by assigning values to the attributes in that event stream.
Click the following topics for a description of the concepts that you need to understand when simulating single events.
Before you try this tutorial, do the following.
- Create the
BookStore
event stream following the instructions in the Create Event Stream tutorial. - Persist the
BookStore
event stream following the instructions in the Persist Event Stream tutorial.
Follow the steps below to publish 15 single events in a persisted event stream.
- In the WSO2 DAS Management Console, click on the Tools tab. Then click Event Simulator to open the Event Stream Simulator page.
 - In the Event Stream Name field, select the XXX event stream. The attributes in the stream are displayed as demonstrated below.
 Simulate 10 events as given in the table below. Click Send to send each event.
Transaction_ID Title Author Price Quantity Date Discount Value _timestamp BSP0000001
The Invisible Man: A Grotesque Romance
Arthur,C,Clarke
6.66
12
2016-11-03
0
79.92
1478160425000
BSP0000002
Childhood's End
Arthur,C,Clarke
5.50
12
2016-10-06
0
66
1475741225000
BSP0000003
Oliver Twist
Charles,Dickens
6.96
20
2016-09-01
0
139.20
1472717225000
BSP0000004
Emma
Jane,Austen
6.73
20
2017-01-05
0
134.60
1483603625000
BSP0000005
Memoirs of a Geisha
Arthur,Golden
9.28
10
2017-02-02
0
92.80
1486022825000
BSP0000006
The Origin of Species
Charles,Darwin
6.25
20
2016-10-31
0
125
1477901225000
BSP0000007
The Adventures of Sherlock Holmes
Arthur,Conan,Doyle
6.00
15
2017-01-30
0.25
90
1485763627000
BSP0000008
A Study in Scarlet
Arthur,Conan,Doyle
5.00
15
2016-11-03
0.25
75
1478160426000
BSP0000009
Sherlock Holmes: The Complete Novels and Stories
Arthur,Conan,Doyle
9.50
30
2016-10-06
0.25
285
1475741226000
BSP0000010
Gone With the Wind
Margaret,Mitchell
6.83
20
2016-09-01
0
136.60
1472717226000
BSP0000011
Mary Called Magdalene
Margaret,George
7.00
10
2016-10-02
0.50
70
1506931625000
BSP0000012
Memoirs of Cleopatra
Margaret,George
7.00
10
2016-08-29
0.50
70
1503994025000
BSP0000013
Elizabeth I
Margaret,George
7.00
10
2017-01-30
0.50
70
1485763625000
BSP0000014
Sinatra: The Life
Anthony,Summers
10.00
5
2016-10-31
0
50
1477901227000
BSP0000015
1984
George,Orwell
6.99
20
2017-01-02
0
139.80
1483344425000
The comma (
,
) separated values entered for the Author attribute define a hierarchy of categories when searching by theAuthor
facet.e.g., In the above table, the following three authors have the same first name.
- Arthur,Conan,Doyle
Arthur,C,Clarke
Arthur,Golden
Here,
Arthur
is considered a main category of theAuthor
facet.Conan
,C
, andDoyle
are subcategories of theArthur
category.Doyle
is a subcategory of theConan
subcategory.This is further demonstrated in the Search for Records Via the Management Console tutorial.