is Async Event Handling possible in Confluence?
Asked by Angel Ruiz:

Hi there,

Looking at the Javadocs I have seen the annotation [@AsynchronousPreferred](https://docs.atlassian.com/atlassian-event/3.1.9/apidocs/index.html). After performing some tests it seems it is working as expected, but I cannot find a single piece of official documentation and forum post mentioning it in the context of implementing a Confluence app.

In fact [the documentation](https://developer.atlassian.com/server/confluence/event-listener-module/) emphasizes that "*Confluence events are currently processed synchronously*"

Can anyone confirm the annotation above is indeed how you do async event handling in Confluence please?

Cheers,


Answers:
author: Shannon S
body: Angel,

I'm not a developer and thus not terribly familiar with this process, but mentions of the annotation in threads on [jira.atlassian.com](http://jira.atlassian.com) mention that you should mark specific events with the annotation. For example:

*
  > Mark with the com.atlassian.event.api.AsynchronousPreferred annotation, which will cause the event to be delivered on a separate thread, with proper transaction management.

I believe this should clarify things for you, but if not, please let us know what you're having trouble with, or perhaps reach out to our other Community, which is specific for development related questions:

* [Atlassian Developer Community](https://community.developer.atlassian.com/)

Regards,

Shannon

comments: author: Angel Ruiz
body: Hi Shannon,

yes I know. I have even tested it and seems to be working as expected. I just wanted some short of official confirmation from Atlassian because apart for the Javadoc, there is no other source of information around this mechanism and I find it weird, because for certain scenarios it can be very handy.

Thanks for your attention!  
Angel


author: Shannon S
body: I'm just finding the information that I think you already looked at:

* <https://docs.atlassian.com/atlassian-event/3.0.0/apidocs/com/atlassian/event/api/AsynchronousPreferred.html>

Is there any specific information you were looking to find out about it? I can try to find out for you.

Regards,

Shannon


author: Angel Ruiz
body: I was looking for this mechanism to be mentioned in this page or similar: <https://developer.atlassian.com/server/confluence/event-listener-module/?_ga=2.250767302.176571999.1549267963-1297549671.1518771007>


author: Shannon S
body: Thank you for clarifying that, Angel.

I submitted a documentation update request at ecosystem.atlassian.net. The case is

* [DOCS-2711](https://ecosystem.atlassian.net/browse/DOCS-2711) *Document AsynchronousPreferred usage in the context of an application*

However, I believe you need to be logged in in order to see it.

If I hear any updates on this in the upcoming future, I'll let you know here, but feel free to reach out on the Developer Community as well and see if you can get information about it.

Regards,

Shannon


author: Angel Ruiz
body: Thanks so much!

It seems I don't have permissions to see the Jira issue. I am logged in.


author: Shannon S
body: Angel,

Thank you for checking. It seems then perhaps that any documentation feedback that gets sent from the page you linked goes to an internal only request.

At any rate, I'll keep an eye on it, and provided they make a response to me in the next week or so, I'll follow-up with you here.

If you find anything out from the Developer Community, you can come here to let us know as well! I'm sure other users are also interested in using this feature.

Regards,

Shannon


author: Akash Hajeri
body: I cannot view document mentioned here.


author: Shannon S
body: Akash,

Thank you for letting me know about this. I've checked the links provided in this thread, but they all appear to be loading for me. Of course, this could be because I am within the Atlassian network.

Could you tell me the URL of the exact document you are not able to load so I can test it externally?

Regards,

Shannon


author: Akash Hajeri
body: Hi Shannon,

I was trying to access <https://ecosystem.atlassian.net/browse/DOCS-2711> document to understand about *AsynchronousPreferred* usage.

Try accessing from external network and it would fail.

Thanks and Regards,  
Akash


author: Shannon S
body: Hello Akash,

Thank you for clarifying. The documents mentioned in the article are the following:

* [Annotation Type AsynchronousPreferred](https://docs.atlassian.com/atlassian-event/3.0.0/apidocs/com/atlassian/event/api/AsynchronousPreferred.html)
* [Event Listener Module](https://developer.atlassian.com/server/confluence/event-listener-module/?_ga=2.213915927.1294575221.1558945229-1483961444.1556008674)

The link at [DOCS-2711](https://ecosystem.atlassian.net/browse/DOCS-2711) is not a document, but a ticket I created with our internal documentation team to update the existing documentation with further details. The project that ticket is currently in is locked to external access and has not yet been completed. This is why you are not able to load it.

I myself am not familiar with the usage of that annotation, but you can feel free to raise a question at our [Developer Community](https://community.developer.atlassian.com/).

Best regards,

Shannon


author: Ibrahim Itani
body: Hello [@Angel Ruiz](/t5/user/viewprofilepage/user-id/591488)

I'm trying to do some stuff in after issue update async in Jira

Can you assist

Thanks


Tags: atl-dev

confluence-server

server