With polling API, client program should create a filter first, then polls subscribe_getFilterChanges method with filterId for new events.
The filter will expire if there is no request for more than 5 minutes, so that the subscription will close automatically. Client can also unsubscribe by calling subscribe_uninstallFilter method.

Persistent connection API will register new subscription first. Any event that was subscribed to will be returned by callback when it is generated.
The subscription will close automatically When persistent connection is broken.

Two types of events are currently supported: new transactions(new account blocks) and new logs(logs in new account blocks).
Each type contains corresponding rollback event. When rollback occurs, the removed field in the event message is set to true.

Topic examples：
{} matches all logs
{{A}} matches the logs having "A" as the first element
{{},{B}} matches the logs having "B" as the second element
{{A},{B}} matches the logs having "A" as the first element and "B" as the second element
{{A,B},{C,D}} matches the logs having "A" or "B" as the first element, and "C" or "D" as the second element