# Event registry with RabbitMQ and Spring Boot

**URL:** https://forum.flowable.org/t/event-registry-with-rabbitmq-and-spring-boot/6508
**Category:** Flowable Engine
**Created:** [August 10, 2020, 12:47pm UTC](https://forum.flowable.org/t/event-registry-with-rabbitmq-and-spring-boot/6508 "2020-08-10T12:47:18Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![dcwik96](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@dcwik96](https://forum.flowable.org/u/dcwik96)
#### Post date: [August 10, 2020, 12:47pm UTC](https://forum.flowable.org/t/event-registry-with-rabbitmq-and-spring-boot/6508/1 "2020-08-10T12:47:18Z")

</div>

There is an example of inbound event registry [https://github.com/seletz/flowable-event-registry-demo](https://github.com/seletz/flowable-event-registry-demo). What I try to do is send outbound event registry. There is ([https://flowable.com/open-source/docs/eventregistry/ch06-EventRegistry-Introduction/](https://flowable.com/open-source/docs/eventregistry/ch06-EventRegistry-Introduction/)) information that we can receive events, not only send.

I want to send to queue information while user/service task is trigged and wait for the respose (also queue) to move forward to next user/service task. Should I use send event task/revice task/boundary event task? How should I listen to queue after send message to it.

![tempsnip](https://canada1.discourse-cdn.com/flex035/uploads/flowable/original/2X/0/046d7dc2cff7b313e72e764cd6a9efc3e634f86f.png)

I use Spring Boot with Flowable and RabbitMQ.

---

<div class="post-metadata">

### Author: ![seletz](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/seletz/32/1681_2.png) [@seletz](https://forum.flowable.org/u/seletz)
#### Post date: [August 10, 2020, 1:01pm UTC](https://forum.flowable.org/t/event-registry-with-rabbitmq-and-spring-boot/6508/2 "2020-08-10T13:01:25Z")

</div>

For our use case – we’re going to use RabbitMQ too – we intend to use send and receive events.

I your case it seems you want synchronous behaviour – so a simple spring bean which sends/receives over RabbitMQ should be all you need. If I understood correctly, you basically want RPC over RMQ.

If you want to use the event registry, it might be easier if you think about starting processes through messages – not waiting in processes. Really depends on the exact use case.

---

<div class="post-metadata">

### Author: ![dcwik96](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@dcwik96](https://forum.flowable.org/u/dcwik96)
#### Post date: [August 10, 2020, 1:48pm UTC](https://forum.flowable.org/t/event-registry-with-rabbitmq-and-spring-boot/6508/3 "2020-08-10T13:48:02Z")

</div>

Yes, I want RPC. Lets say that I have beans with send/receive action, how will I freeze proces until i get message from queue?  
Also I dont understand ‘_bean which sends/receives over RabbitMQ_’, have you any example?  
Another question, ‘_starting processes through messages_’, also any example?

Can process procedure like example on image or should I use ReceiveTask/SendEventTask?

Advantage of the opportunity, why you have file _outbound.channel_ in your repository? Do you use it?

---

<div class="post-metadata">

### Author: ![seletz](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/seletz/32/1681_2.png) [@seletz](https://forum.flowable.org/u/seletz)
#### Post date: [August 11, 2020, 7:30am UTC](https://forum.flowable.org/t/event-registry-with-rabbitmq-and-spring-boot/6508/4 "2020-08-11T07:30:35Z")

</div>

With bean I mean a Spring Java Bean, assuming you use Spring Boot. Any @Service bean is accessible from within a script task.

I’d suggest that you read the docs about the Java integration and how to create Java based tasks:

> **[BPMN 2.0 Constructs · Flowable Open Source Documentation](https://flowable.com/open-source/docs/bpmn/ch07b-BPMN-Constructs/)**
>
> This chapter covers the BPMN 20 constructs supported by Flowable, as well as custom extensions to the BPMN standard.

Regarding RPC and waiting. If you really want to do that synchronously, create a java class which does what you want. Test it w/o flowable first. Then wrap it in a Java Service Task:

> **[BPMN 2.0 Constructs · Flowable Open Source Documentation](https://flowable.com/open-source/docs/bpmn/ch07b-BPMN-Constructs/#java-service-task)**
>
> This chapter covers the BPMN 20 constructs supported by Flowable, as well as custom extensions to the BPMN standard.

---

<div class="post-metadata">

### Author: ![dcwik96](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@dcwik96](https://forum.flowable.org/u/dcwik96)
#### Post date: [September 14, 2020, 9:31pm UTC](https://forum.flowable.org/t/event-registry-with-rabbitmq-and-spring-boot/6508/5 "2020-09-14T21:31:37Z")

</div>

I put an example here [https://github.com/dcwik96/Flowable-event-registry](https://github.com/dcwik96/Flowable-event-registry)  
Its similar to @seletz but there is triggerable set and task wait for response from queue. That is what I needed. Thanks for help.

---

<div class="post-metadata">

### Author: ![joram](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/joram/32/26_2.png) [@joram](https://forum.flowable.org/u/joram)
#### Post date: [September 22, 2020, 9:34pm UTC](https://forum.flowable.org/t/event-registry-with-rabbitmq-and-spring-boot/6508/6 "2020-09-22T21:34:19Z")

</div>

Awesome, thanks for sharing this!

---

<div class="post-metadata">

### Author: ![seletz](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/seletz/32/1681_2.png) [@seletz](https://forum.flowable.org/u/seletz)
#### Post date: [November 15, 2020, 4:29pm UTC](https://forum.flowable.org/t/event-registry-with-rabbitmq-and-spring-boot/6508/7 "2020-11-15T16:29:12Z")

</div>

Thanks for the example – will have a look.

---

<div class="post-metadata">

### Author: ![abhishek28](https://avatars.discourse-cdn.com/v4/letter/a/2acd7d/32.png) [@abhishek28](https://forum.flowable.org/u/abhishek28)
#### Post date: [September 14, 2022, 1:22pm UTC](https://forum.flowable.org/t/event-registry-with-rabbitmq-and-spring-boot/6508/8 "2022-09-14T13:22:12Z")

</div>

Hi,  
actually i also want to do same process to receive event from rabbitMq in flowable ui (open source) but getting some error .  
can anyone help me that what should be the configuration of start event registry event and how to send message(json) from rabbitMq .

Thanks  
Abhishek
