Subscribing to Asynchronous events

Hi,

I am looking for a way to get notified when something changes in Jira. For exaple:
We have a project in Jira and i wan to know when a ticket changes state e.g. from development to code review.
Ideally this should be available via asynchronous events in order to be efficient and also put this information in a Kafka topic for others to consume.
Is this possible?

You can achieve this by creating a plugin the uses Atlassian event library as described in this tutorial:
https://developer.atlassian.com/server/jira/platform/writing-jira-event-listeners-with-the-atlassian-event-library/

You can view some of the events you can listen to here: Jira Event Javadoc

By default these events are synchronous, so you have to raise a new event with the @AsynchronousPreferred annotation as described in this tutorial: Bitbucket

Then when you receive your own asynchronous event, you can call whatever external system you would like from within your event listener code.

Hope that answers your question.

2 Likes

Hello, Richard!

Sorry for necroposting

Link for atlassian labs bitbucket is dead yet. Are any other sources with their code available now?

1 Like

Hi @SotiriosMantziaris

Yes, it is possible to subscribe to asynchronous events in Jira and publish them to a Kafka topic. There are a few different ways to do this, but the most common approach is to use a Jira plugin like the Atlassian Event Bus Plugin.

The Atlassian Event Bus Plugin provides a way to publish and consume events from Jira. It supports a variety of different event types, including issue events, project events, and system events.

To use the Atlassian Event Bus Plugin to publish events to Kafka, you will need to:

  • Install the plugin on your Jira server.
  • Create a Kafka topic to receive the events.
  • Configure the plugin to publish the events to the Kafka topic.
  • Once you have configured the plugin, you will be able to subscribe to the events in Kafka using any Kafka consumer.

Another option for publishing Jira events to Kafka is to use a custom Jira plugin. This can be more complex to set up, but it gives you more control over how the events are published.

If you are looking for a more managed solution, you can use Atlassian’s Jira Service Management (JSM) Cloud product. JSM Cloud includes a built-in integration with Kafka, which makes it easy to publish Jira events to Kafka. I hope this helps and if you need further consultation please visit me at triotech systems!

Regards

Rehes