Description Usage Arguments Format Value Examples
Pulsar class
1 |
connection |
Pulsar host and port (format: "hostname:port") |
topic |
Full name of the topic including persistence, tenant, namespace and pub/sub name |
onMessageFct |
Function invoked when when receiving message |
An object of class R6ClassGenerator
of length 24.
a Pulsar connection object
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
producer <- Pulsar$new("localhost:8080", "persistent/public/default/my-topic")
producer$send("hello")
onMsg = function(payload) {
cat("Received string:", rawToChar(payload), "\n")
TRUE
}
consumer <- Pulsar$new("localhost:8080", "persistent/public/default/my-topic/my-sub",
onMessageFct = onMsg)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.