-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TRC: Built-in message queue for event subscribe #28
Comments
How exactly I can subscribe to the topic? I have tried to send this JSON variable in order to subscribe, but no lack: {"triggerName": "block", enable: true, "topic": "block"} but none from above is working for me and I have enabled block topic in main config. |
Does anybody has an example? |
Hi,
When I run the code then it return "parse error". Thanks, |
tip: 28
title: TRC-28 Built-in message queue for event subscribe
author: jiangyy [email protected]
discussions to: #28
status: accepted
type: Standards Track
category: TRC
created: 2019-03-14
Simple Summary
Adding built-in message queue for event subscribe in java-tron.
Abstract
The built-in message queue is designed for event subscribe. Developers could subscribe triggers directly from fullnode without event plugin.
Motivation
Developers could use event plugins to subscribe triggers from fullnode, which provide very reliable service and store very large amount of data.
But in some cases, developers want to subscribe directly from fullnode, with short-term subscriptions. Native message queue is implemented to meet such requirement.
Specification
The function of native queue is configurable. It's is disabled by default. It shared the configuration of triggers with eventplugin.
The communication channel between fullnode and subscription client is socket. The bindport could be configurable to avoid conflicting.
event.subscribe = {
native = {
useNativeQueue = true // if true, use native message queue, else use event plugin.
bindport = 5555 // bind port
sendqueuelength = 1000 //max length of send queue
}
......
}
Developers should subscribe triggers very conveniently. What they need to do is: connecting to the port, subscribing the topics, then receivingthe triggers.
The text was updated successfully, but these errors were encountered: