.. _c3_topic_message_browser: ####################################### View Messages Using |c3-short| for |cp| ####################################### .. meta:: :title: Confluent Control Center Topic Message Browser :description: This document describes the Topic Message Browser feature for Confluent Control Center. Inspect topic messages, jump to an offset or timestamp, pause and play incoming messages, and download selected messages. :keywords: Confluent Control Center, topics, message browser, jump to offset, jump to timestamp, audit logs, query in ksqlDB From the **Messages** page, you can view the data being produced to a topic. Browse message data, seek to a specific offset or timestamp by partition, and select messages you want to download. Prerequisites There must be data being produced to or already present in a topic. If you don't already have data flowing through a topic, you can use the appropriate :ref:`quick start guides ` to get started. You can replay old data that was already produced as long as it hasn't been compacted or deleted yet. Messages cannot be viewed if LDAP Basic Auth is implemented and the user is a member of a restricted group. If users need to view messages, consider using RBAC instead of LDAP Basic Auth. .. _c3_inspect_topic: ************************************ View and filter messages for a topic ************************************ The Message Browser feature in |c3-short| is :ref:`enabled ` by default. With this feature, you can: - :ref:`c3_browse_stream` - :ref:`c3_change_layout` - :ref:`c3_msgs_filter_keyword` - :ref:`c3_msgs_jump_offset` - :ref:`c3_msgs_jump_time` - :ref:`c3_msgs_jump_timestamp` .. _c3_browse_stream: Browse a live stream of messages ================================= #. Select a cluster from the navigation bar and click the **Topics** menu. The :ref:`c3_all_topics` appears. #. In the **Topics** table, click the topic name link. #. Click the **Messages** tab. The messages page opens in table view by default. #. To browse the messages table: #. Scroll vertically to see all of the available data. The newest data is displayed at the top of the table. .. figure:: /images/c3-topics-messages-table-view.png :width: 85% :alt: Browse messages in the default table view #. Click the pause icon |image_pause| to pause the scrolling of incoming messages so that you can analyze the data. Messages may still be produced to the topic; however, the message browser does not display newly consumed data while the view is paused. Click the play icon to resume displaying incoming messages. .. |image_pause| image:: /images/c3-cloud1st-topic-browser-pause-play-icons.png .. _c3_change_layout: Change layout and expand messages ============================================= You can switch between **Card view** and **Table view**, show and hide columns, and view full messages. - Click the **Card view** (default) or **Table view** |image_layout| to change the output layout. You can show and hide columns in **Table view**. This can help focus on columns of interest without requiring horizontal scrolling. - Hover over the more option icon (**…**) and select **Show/hide columns**. - Select the columns you want to toggle on or off in the topic messages table. There must be populated message data for the **Columns** selector to appear. Note that if you jump to an offset or timestamp, the table resets to show all columns again. .. figure:: /images/ccloud1st-c3-topicmsg-column-selector.png :scale: 50% :alt: Column selector topic messages view Column selector topic messages view .. |image_layout| image:: /images/c3-cloud1st-cards-table-icons.png You can browse and expand message in card view: #. Use the layout selector to change to card view #. Click the expand icon |expand-icon| in the card view to access the contents of a message. Note the expanding the card view for a message automatically pauses the display of incoming data. .. figure:: /images/c3-topic-browse-messages-card.png :scale: 85% :alt: Expanded card view. #. Click the **Value**, **Header** or **Key** tab to display that section of the message. .. figure:: /images/c3-expanded-options.png :scale: 85% :alt: Value, header and key message options. .. |expand-icon| image:: /images/c3-expand-icon.png #. Click the play icon to collapse the expanded cards views and resume displaying incoming data. .. _c3_msgs_filter_keyword: Filter by keyword ================= To filter the results, enter filter criteria in the **Filter by keyword** box. Note that only prefix searching is currently supported. You can search for the beginning portion of a keyword. The search keyword must be the first substring in a column item. The filter matches the search string across any of the columns. .. figure:: /images/ccloud1st-c3-browse-search-topic.png :scale: 85% :alt: Search topic messages by keyword Prefix search for topic messages by keyword of value .. _c3_msgs_jump_offset: Jump to an offset ================= To jump to a message offset, click the **Jump to offset** menu and enter the offset and partition. Messages are displayed in the message browser pane starting from the desired offset, and continue to feed in at the top of the message browser pane. The record at the offset is highlighted and :ref:`preselected for download `. .. figure:: /images/c3-topics-jump-offset-result.png :width: 600px :alt: Jump to an offset in Control Center topic message browser .. _c3_msgs_jump_time: Jump to a date and time ======================= .. include:: ../includes/c3-topic-msg-jump-time.rst To jump to a specific date and time: #. Click the **Jump to time** menu. .. figure:: /images/ccloud1st-c3-jump-time-menu.png :scale: 50% :alt: Jump to time menu topic message browser #. Click the default current date and time box to open a calendar. .. figure:: /images/ccloud1st-c3-jump-time-calendar.png :scale: 50% :alt: Jump to a human-readable date and time in Confluent Cloud topic message browser #. Select a partition. Note that you must select a partition before trying to adjust the time or apply the new date and time. .. figure:: /images/cloud-topics-time-choose-partition.png :scale: 50% :alt: Choose a partition for jump to specific date and time #. Click a calendar date. Use the arrows to go forward or back and select a month and day. #. Click the time box to adjust the time in hours, minutes, seconds, and AM or PM. .. figure:: /images/ccloud1st-c3-jump-time-box.png :scale: 50% :alt: Jump to custom date/time topic message browser #. Click **Apply**. .. _c3_msgs_jump_timestamp: Jump to a timestamp =================== To jump to a message timestamp, click the **Jump to timestamp** menu and enter the timestamp and partition. The timestamp is displayed in microseconds. Enter your time of interest in milliseconds into the timestamp box and selected partition. .. tip:: Use a `timestamp converter `_ to convert the timestamp into a human-readable date and time. .. include:: ../includes/c3-topic-msg-jump-time.rst .. figure:: /images/c3-jump-timestamp-result.png :width: 80% :alt: Jump to a timestamp in Control Center topic message browser .. _c3_produce_topic: ******************************** Produce a new message to a topic ******************************** You can manually produce a new message to a topic using the **Produce a new message to this topic** window. #. To produce a message, click the + sign to expand the window. .. figure:: /images/c3-produce-message.png :width: 50% :alt: Produce a new message to this topic button #. Enter a valid JSON message in the **Value** box, and a **Key**, if desired. #. Click **Produce**. The message is generated and the message table is populated with your entry. .. figure:: /images/c3-new-message.png :width: 85% :alt: Add a value and key to create a message .. include:: ../includes/c3-download-selected-msgs.rst .. _ff_c3_inspect_topic: ******************************************************************** Enable and disable message browsing in |c3-short| ******************************************************************** The topic inspection feature is enabled by default in |c3-short|. The feature can be disabled if an organization does not want any users to access the feature. After disabling the feature, the **Messages** tab is no longer visible in the |c3-short| UI. To disable the topic inspection feature in |c3-short|: #. Set the ``confluent.controlcenter.topic.inspection.enable`` option in your ``control-center.properties`` file to ``false``. .. sourcecode:: bash ... confluent.controlcenter.topic.inspection.enable=false ... .. note:: Make the change in the appropriate |c3-short| properties file or files configured for your environments, including ``control-center-dev.properties`` or ``control-center-production.properties``. The properties files are located in ``/path-to-confluent/etc/confluent-control-center/``. For more informatin, see :ref:`c3_properties_files`. #. Restart |c3-short| and pass in the properties file for the configuration to take effect. For more information about restarting |c3-short| and passing in its properties files, see :ref:`c3_properties_files`. .. sourcecode:: bash ./bin/control-center-stop ./bin/control-center-start ../etc/confluent-control-center/control-center.properties .. tip:: If you are using a |cp| development environment with a :confluent-cli:`Confluent CLI|index.html`, stop and start as follows: .. codewithvars:: bash |confluent_stop_control_center| |confluent_start_control_center| ../etc/confluent-control-center/control-center-dev.properties #. To re-enable the topic feature, set the option back to ``true`` and restart |c3-short| with the updated properties file. **************** Search audit log **************** When you are searching the :ref:`audit log ` for user activity in the message browser, you must use the format ``User:``. To navigate to the audit log, click **Cluster** > **Topics** > ``confluent-audit-log-events`` > **Messages** tab. .. figure:: /images/c3-rbac-topic-msg-audit-log-user.png :scale: 50% :alt: Search audit log messages by user ********************* Additional resources ********************* * `Creating Messages from within Control Center (blog post) `__ * `Exporting Messages via Control Center (blog post) `__