Viewing messages in Kafka and IBM Event Stream topic

You can view messages through the IBM Event Stream console or through Kafka.

About this task

These instructions give you the option to view messages through the IBM Event Stream console or through the Kafka-console-consumer.

Procedure

  1. You can use the IBM Event Stream console to view your messages.
    1. Log in to the IBM Event Streams console.
    2. Select Topic > ibm-bai-ingress > Messages.
    3. Select a date.
    4. The messages are listed according to time stamps.
  2. You can use the Kafka-console-consumer to view your messages. It provides a command line utility, bin/kafka-console-consumer.sh, that sends messages from a topic to an output file.
    1. To display all messages:
      $KAFKA_HOME/bin/kafka-console-consumer.sh --bootstrap-server ${KAFKA_HOST}:{PORT} --topic ibm-bai-ingress --from-beginning --consumer.config client-ssl.properties
    2. To display a maximum number of messages by using: --from-beginning and --max-messages ${NUM_MESSAGES}.
      $KAFKA_HOME/bin/kafka-console-consumer.sh --bootstrap-server ${KAFKA_HOST}:{PORT} --topic ibm-bai-ingress --from-beginning --max-messages 5 --consumer.config client-ssl.properties
    3. To display the time stamp of messaging by using: --property print.timestamp=true
      $KAFKA_HOME/bin/kafka-console-consumer.sh --bootstrap-server ${KAFKA_HOST}:{PORT} --topic ibm-bai-ingress --from-beginning --max-messages 5 --property print.timestamp=true --consumer.config client-ssl.properties