evtctxget()

Loads attribute information by selecting the event context associated with the key. If no event context exists with the specified key, it returns null.

Syntax

evtctxget(TOPIC, KEY, ATTR)
Required Parameters
TOPIC
Topic of the event context.
KEY
Unique key that distinguishes the event context.
ATTR
Attribute string can be one of the following strings.
  • counter: returns an integer indicating the number of times an event has occurred for the same key. It always returns a value greater than or equal to 1.
  • created: returns a date value indicating the time when the event first occurred.
  • expire: If the expiration date is specified, this returns a date value indicating the time at which the event context is deleted.
  • timeout: If the timeout is specified, tthis returns a date value indicating the time at which the context of the event is deleted due to the timeout.
  • rows: returns an array of all records currently stored in the event context.

Usage

When there is an event context with a topic of txmatch, 001122 of txkey, and a timeout of 10 seconds

evtctxget("txmatch", "001122", "counter") => 1
evtctxget("txmatch", "001122", "created") => "Fri May 02 15:21:50 KST 2014"
evtctxget("txmatch", "001122", "expire") => null
evtctxget("txmatch", "001122", "timeout") => "Fri May 02 15:22:00 KST 2014"
evtctxget("txmatch", "001122", "rows") => [{txkey=001122, type=send}]