Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add kafka producer to send task status messages #5405

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on May 21, 2024

  1. Add kafka producer to send task status messages

    To try locally, you can use the oci-env kafka profile from pulp/oci_env#159.
    
    Set up the oci-env to use the kafka profile:
    
    ```
    COMPOSE_PROFILE=kafka
    ```
    
    From a fresh oci-env pulp instance, try:
    
    ```shell
    export REPO_NAME=$(head /dev/urandom | tr -dc a-z | head -c5)
    export REMOTE_NAME=$(head /dev/urandom | tr -dc a-z | head -c5)
    oci-env pulp file repository create --name $REPO_NAME
    oci-env pulp file remote create --name $REMOTE_NAME \
        --url 'https://fixtures.pulpproject.org/file/PULP_MANIFEST'
    oci-env pulp file repository sync --name $REPO_NAME --remote $REMOTE_NAME
    ```
    
    Then inspect the kafka message that is produced via:
    
    ```shell
    oci-env exec -s kafka \
      /opt/kafka/bin/kafka-console-consumer.sh \
      --bootstrap-server=localhost:9092 \
      --offset earliest \
      --partition 0 \
      --topic pulpcore.tasking.status \
      --max-messages 1
    ```
    
    Closes pulp#5337
    kahowell committed May 21, 2024
    Configuration menu
    Copy the full SHA
    c4030e7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    adc4193 View commit details
    Browse the repository at this point in the history