copyright | lastupdated | ||
---|---|---|---|
|
2017-02-17 |
{:new_window: target="_blank"} {:shortdesc: .shortdesc} {:screen: .screen} {:codeblock: .codeblock} {:pre: .pre}
{: #messagehub_main}
Connecting {{site.data.keyword.messagehub_full}} to {{site.data.keyword.iot_short}} provides a scalable, high-throughput message bus for historical data storage. {{site.data.keyword.messagehub}} is built on Apache Kafka, which is an open-source, high-throughput messaging system that provides a low-latency platform for handling real-time data feeds.
{: #byb}
Before connecting a {{site.data.keyword.messagehub}} to your {{site.data.keyword.iot_short}} service, complete the following tasks:
-
Set up {{site.data.keyword.messagehub}} in the same {{site.data.keyword.Bluemix_notm}} space as your {{site.data.keyword.iot_short_notm}} by using the {{site.data.keyword.Bluemix_notm}} Catalog. For more information about {{site.data.keyword.messagehub}}, see the Getting started with {{site.data.keyword.messagehub}}.
-
Ensure that you have developer privileges in the {{site.data.keyword.Bluemix_notm}} organization and that you are signed in via {{site.data.keyword.Bluemix_notm}}. If you are not signed in through {{site.data.keyword.Bluemix_notm}}, or do not have developer privileges in this {{site.data.keyword.Bluemix_notm}} organization, you are not able to authorize the binding of {{site.data.keyword.messagehub}} and the {{site.data.keyword.iot_short_notm}}.
To connect {{site.data.keyword.messagehub}} for historical data storage:
- On your {{site.data.keyword.iot_short}} dashboard click Extensions in the navigation bar.
- In the Historical Data Storage tile, click Setup.
- Select the {{site.data.keyword.messagehub}} service that you want to connect.
All available {{site.data.keyword.messagehub}} services within the same {{site.data.keyword.Bluemix_notm}} space as your {{site.data.keyword.iot_short}} service are listed in the Configure historical data storage section. - Select your {{site.data.keyword.messagehub}} configuration options:
- Select a time zone.
The timestamps on the device data that is sent to the {{site.data.keyword.messagehub}} are converted to the selected timezone. - Select a default topic.
Device events are sent to the default topic if one is defined here. To use more granular topic assignments, leave the default topic blank and add custom forwarding rules. - Optional: Specify custom forwarding rules.
Specify additional rules for forwarding device events. Only events that match the custom forwarding rules are forwarded.
Note: An event might match multiple forwarding rules and be forwarded to multiple {{site.data.keyword.messagehub}} topics. - Optional: Configure topics.
To create the topics with more than the default two partitions, you can specify the partition configuration. - Click Done.
- Click Authorize.
- In the Authorization dialog box, click Confirm.
Your device data is now stored in your {{site.data.keyword.messagehub}}.