Camel PubNub component
Camel PubNub component can be used to communicate with the PubNub data stream network for connected devices. This component uses pubnub library
Maven dependency
Maven users should add the following dependency to their POM file:
io.rhiotcamel-pubnub${rhiot.version}
Avaliable for rhiot.version >= 0.1.1
General URI format
The following values are currently supported as pubnubEndpointType:
pubsub
presence
URI Parameters
Option | Default value | Description |
| The punub publisher key optained from pubnub. Mandatory for publishing events | |
| The punub subsciber key optained from pubnub. Mandatory when subscribing to events | |
| The pubnub secret key. | |
| true | Use SSL transport. |
| The uuid identifying the connection. If not set it will be auto assigned | |
|
| Producer only. The operation to perform when publishing events or ad hoc querying pubnub. Valid values are |
Operations can be used on the producer endpoint, or as a header:
Operation | Description |
| Publish a message to pubnub. The message body shold contain a instance of |
| Read presence (Who's online) information from the endpoint channel. |
| Read presence information for the uuid on the endpoint. You can override that by setting the header |
| Set the state by uuid. The message body should contain a instance of |
| Get the state object |
| Gets the message history for the endpoint channel. |
Consuming:
Route that consumes messages from mychannel:
Route that listens for presence (eg. join, leave, state change) events on a channel
Producing
Route the collect data and sendt it to pubnub channel mychannel:
Last updated