jenkinsci / jms-messaging-plugin

https://plugins.jenkins.io/jms-messaging
12 stars 38 forks source link

Support RabbitMQ as a Provider #132

Closed bstinsonmhk closed 3 years ago

bstinsonmhk commented 5 years ago

We currently use the JMS Messaging Plugin in Jenkins Pipelines with the Fedmsg Provider for the Fedora CI project (https://docs.fedoraproject.org/en-US/ci/)

We are planning on migrating our messaging system to RabbitMQ, and would like to continue using the JMS Messaging Plugin in the same workflow (same topics, same certificate-style authentication, etc.)

This ticket is to track the progress on:

We think that we should start writing the simple java client using this library: (https://www.rabbitmq.com/jms-client.html)

scoheb commented 5 years ago

Created initial skeleton here: https://github.com/jenkinsci/jms-messaging-plugin/tree/rabbitmq-skeleton

Zlopez commented 5 years ago

@scoheb I started working on the simple client implementation and I have a question:

How the com.redhat.jenkins.plugins.ci.messaging.RabbitMQMessagingWorker.subscribe should work? I looked at the FedMsg and ActiveMQ implementation and I don't see any callback that will trigger job when something is received. Without comments or documentation it's hard to understand how this method works, could you explain it to me?

scoheb commented 5 years ago

CITriggerThread.java calls messagingWorker.receive(jobname, providerData); receive() then calls JMSMessagingWorker.receive() which your initial subscribe would have setup.

FYI @ggallen

Zlopez commented 5 years ago

Thanks for explanation, now I know that I need to override receive. :-)

My first understanding was that subscribe is listening to any new message and some callback is called when the message is received.

github-actions[bot] commented 4 years ago

Stale issue message

Zlopez commented 4 years ago

The https://github.com/jenkinsci/jms-messaging-plugin/pull/154 is already merged, this issue could be closed

bstinsonmhk commented 3 years ago

This can indeed be closed!