-
Notifications
You must be signed in to change notification settings - Fork 16
Esper Processor Supported Annotations
@ClusterAffinityTag(colname="ip")
The @ClusterAffinityTag annotation is used to pick the value of the ip address field in the event and pass a hint to the messaging layer to use this value as a affinity(sharding) key.
@ClusterAffinityTag(dimension=@CreateDimension(name="d",dimensionspan="<field1>, <field2>"))
The @ClusterAffinityTag annotation is used to pick the dimension named d as a hint to the messaging layer to use this value as a affinity(sharding) key. The dimension is created on the fly from the event fields named field1 and field2.
@PublishOn(topics="Rtbdpod.RTD/rtdEvent")
@PublishOn(topics="Rtbdpod.RTD/rtdEvent,Rtbdpod.RTD/blockedEvent") - multiple topics
The @PublishOn annotation is used to pass a hint to the OutboundChannel to publish the event on topic "Rtbdpod.RTD/rtdEvent". The events scheduled out of the OutboundChannel stage are scheduled to the next stage using a consistent hashing scheduler.
@OutputTo("OutboundMessageChannel") select * from RTD;
The @OutputTo annotation is used to signal to the framework to dispatch to a stage named "OutboundMessageChannel" directly connected to Esper Processor. Note: Make sure stage/sink mentioned in @OutputTo is given as a sink to EsperProcessor in the xml configuration.
@SendMail(mailServer="<SMTP_mailserver>",alertList="<mailaddress>@domain.com",sendFrom="<mailaddress>@domain.com",eventFields="field1, field2", mailSubject="Subject on Email" mailContents="Email Contents")
Select field1, field2 from TestStream where field1 > 1000 ;
The @SendMail annotation can be used to send a mail from EsperPocessor when particular EPL condition gets satisfied.