Creating a RabbitMQSource

    1. You have installed
    2. You have installed CertManager v1.5.4 - easiest integration with RabbitMQ Messaging Topology Operator
    3. You have installed - our recommendation is latest release with CertManager
    4. A working RabbitMQ Instance, we recommend to create one Using the . For more information about configuring the CRD, see the RabbitMQ website
    1. Install the RabbitMQSource controller by running the command:

    2. Verify that rabbitmq-controller-manager and rabbitmq-webhook are running:

      1. kubectl get deployments.apps -n knative-sources

      Example output:

      1. NAME READY UP-TO-DATE AVAILABLE AGE
      2. rabbitmq-controller-manager 1/1 1 1 3s
      3. rabbitmq-webhook 1/1 1 1 4s
    1. Create the event-display Service as a YAML file:

      1. apiVersion: serving.knative.dev/v1
      2. kind: Service
      3. name: event-display
      4. namespace: default
      5. spec:
      6. template:
      7. spec:
      8. containers:
      9. # https://github.com/knative/eventing/tree/main/cmd/event_display/main.go
      10. image: gcr.io/knative-releases/knative.dev/eventing/cmd/event_display
    2. Apply the YAML file by running the command:

      Example output:

      1. service.serving.knative.dev/event-display created
    3. Ensure that the Service Pod is running, by running the command:

      1. kubectl get pods

      The Pod name is prefixed with event-display:

      1. NAME READY STATUS RESTARTS AGE
      2. event-display-00001-deployment-5d5df6c7-gv2j4 2/2 Running 0 72s
    1. Create a YAML file using the following template:

      Where:

      • <source-name> is the name you want for your RabbitMQSource object.
      • <cluster-name> is the name of the RabbitMQ cluster you created earlier.

      You cannot set name and connectionSecret at the same time, since name is for a RabbitMQ Cluster Operator instance running in the same cluster as the Source, and connectionSecret is for an external RabbitMQ server.

    2. Apply the YAML file by running the command:

      1. kubectl apply -f <filename>

      Where <filename> is the name of the file you created in the previous step.

    Check the event-display Service to see if it is receiving events. It might take a while for the Source to start sending events to the Sink.

    1. ☁️ cloudevents.Event
    2. Context Attributes,
    3. specversion: 1.0
    4. type: dev.knative.rabbitmq.event
    5. source: /apis/v1/namespaces/default/rabbitmqsources/<source-name>
    6. subject: f147099d-c64d-41f7-b8eb-a2e53b228349
    7. id: f147099d-c64d-41f7-b8eb-a2e53b228349
    8. time: 2021-12-16T20:11:39.052276498Z
    9. datacontenttype: application/json
    10. Data,
    11. {
    12. ...
    13. Random Data
    14. ...
    15. }

    Cleanup

    1. Delete the RabbitMQSource:

      1. kubectl delete -f <source-yaml-filename>
    2. Delete the event display Service:

    • To report a bug or request a feature, open an issue in the .