Event Subscription
In version 3.5, the Pollux development team introduced an event subscription mechanism, enabling developers to receive events triggered on the chain by the event plugin.
Services
Pollux provides the following ways to get events.
Pollux provides the following ways to get events.
PolluxGrid encapsulates the event plugin interface and provides a public, friendly https event query interface.
PolluxWeb provides the encapsulated js methods to get events.
Set up an event plugin locally to provide event queries.
The Pollux development team released two event plug-ins, kafka & mongodb plug-ins.
Supporting subscription of chain data, such as block, transaction, contract log, contract event and so on, developers can also customize their own plug-ins according to their own needs.
Event query service pollux-eventquery, online Event query service provided.
Use Java-pollux's built-In message queue for event subscription.
Plugin
The function of the Poxchain plugin is to implement event dump. Developers can customize it according to their needs, such as Message queue, Kafka, MongoDB, or writing to local files.
To use the event plugin, set useNativeQueue to false in the node configuration file, as follows:
The plugins offered by the Pollux development team are independent of java-Pollux and are not loaded by default. They can be enabled by configuring command line parameters. By default, only subscriptions to smart contract events are supported. Developers can subscribe to other triggers by modifying configuration files, and they have flexibility in defining plug-in configuration files, including message queue server addresses, defined Trigger types, and so on.
Event Type
POX Event Subscription supports 4 types of event:
1.Transaction Event
The parameters passed to Subscriber:
2.Block Event
The parameters passed to Subscriber:
3.Contract Event
The parameters passed to Subscriber:
4.Contract Log Event
The parameters passed to Subscriber:
Contract Event and Contract Log Even support event filter function which includes:
Last updated