module:events
- Description:
Event queue processor
If any of
events-worker-queue-XXXparameters are defined then workers subscribe to configured event queues and listen for events.Each event queue can run multiple functions idependently but will ack/nack for all functions so to deal with replay dups it is advised to split between multiple consumers using the syntax:
queue#channel@consumerMultiple event queues can be defined and processed at the same time.
An event processing function takes 2 arguments, an event and callback to call on finish
Methods
(static) putEvent(subject, type, data, optionsopt) → {int}
- Description:
Place an event into a queue by subject and type
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
subject |
string | event stream or ID, can be hierarchical like path |
|
type |
string | event type usually in reverse domain notation, what happened with the subject |
|
data |
object | an object to be placed as the |
|
options |
object |
<optional> |
queue specific properties |
Returns:
| Type | Description |
|---|---|
| int |
|