Browsing messages in the Red Hat OpenShift Streams for Apache Kafka web console

Guide
  • Red Hat OpenShift Streams for Apache Kafka 1
  • Updated 22 February 2023
  • Published 29 April 2022

Topics included in this guide

Browsing messages in the Red Hat OpenShift Streams for Apache Kafka web console

Guide
Red Hat OpenShift Streams for Apache Kafka 1
  • Updated 22 February 2023
  • Published 29 April 2022

As a developer or administrator, you can use the Red Hat OpenShift Streams for Apache Kafka web console to view and inspect messages for a Kafka topic. You might use this functionality to verify that a client is producing messages to the expected topic partition or that messages have the expected content.

When you select a topic in the web console, you can use the Messages tab to view a list of messages for that topic. You can filter the list of messages in the following ways:

  • Specify a partition and see messages sent to the partition.

  • Specify a partition and offset and see messages sent to the partition from that offset.

  • Specify a partition and a timestamp (that is, date and time) value. See messages sent to the partition from that date and time.

  • Specify a partition and a Unix epoch timestamp value and see messages sent to the partition from that epoch timestamp value.

Browsing messages for a topic

The following procedure shows how to filter and inspect a list of messages for a topic in the Red Hat OpenShift Streams for Apache Kafka web console.

Prerequisites
Procedure
  1. In the OpenShift Streams for Apache Kafka web console, click Kafka Instances in the left navigation menu.

  2. On the Kafka Instances page, click a Kafka instance.

  3. In your Kafka instance, click the Topics tab.

  4. In the topics table, click a Kafka topic that you want to inspect.

  5. In your topic, click the Messages tab.

    By default, the Messages page shows messages in partition 0 of your topic. You can change this partition value, as described later in the procedure.

    The messages table includes columns for the following topic and message properties:

    • Partition

    • Offset

    • Timestamp (date and time)

    • Key

    • Headers

    • Value

  6. To see complete data for a message, click Show more in the Value, Key, or Headers column.

    A Message pane opens to show the complete message data. This pane also shows the epoch timestamp value.

    If you’re using a schema in Red Hat OpenShift Service Registry with your topic, the Messages page does not deserialize messages that a producer application serialized to conform to that schema. To view such messages, you must configure a consumer application to use a Kafka deserializer. For more information, see Configuring Kafka serializers/deserializers in Java clients.

    Similarly, if a message is encoded (for example, in a format such as UTF-8 or Base64), the Messages page does not decode the message.

  7. To copy the full message value or header data, click the copy icon next to the data in the Message pane.

  8. To see messages for a different topic partition, select a new value in the Partition list.

    If you have many partitions, you can filter the values shown in the Partition list by typing a value in the field.
  9. To further refine the list of messages in the table, use the filter controls at the top of the Messages page.

    • To filter messages by topic partition and offset, perform the following actions:

      1. In the Partition field, select a topic partition.

      2. Click the arrow next to Latest messages and select Offset from the list.

      3. In the Specify offset field, type an offset value.

      4. To apply your filter settings, click the search (magnifying glass) icon.

    • To filter messages by topic partition and date and time, perform the following actions:

      1. In the Partition field, select a topic partition.

      2. Click the arrow next to Latest messages and select Timestamp from the list.

        Additional selection tools appear.

      3. Use the additional selection tools to set date and time values. Alternatively, type a date and time value in the format shown in the field.

      4. To apply your filter settings, click the search (magnifying glass) icon.

    • To filter messages by topic partition and epoch timestamp, perform the following actions:

      1. In the Partition field, select a topic partition.

      2. Click the arrow next to Latest messages and select Epoch timestamp from the list.

      3. In the Epoch timestamp field, type or paste an epoch timestamp value.

        You can easily convert a human-readable date and time to an epoch value using a timestamp conversion tool.
      4. To apply your filter settings, click the search (magnifying glass) icon.

    Based on your filter settings, the Messages page automatically reloads the list of messages in the table.