package org.camunda.bpm.extension.cloud.amqp;

import org.camunda.bpm.cloud.properties.CamundaCloudProperties;
import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.TopicExchange;
import org.springframework.amqp.rabbit.connection.ConnectionFactory;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.amqp.support.converter.Jackson2JsonMessageConverter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

@Configuration
@EnableConfigurationProperties(CamundaCloudProperties.class)
public class CamundaCloudAmqpAutoConfiguration {

  @Autowired
  private CamundaCloudProperties properties;

  @Bean
  Queue queue() {
    return new Queue(properties.getAmqp().getQueue().getCommand(), true);
  }

  @Bean
  TopicExchange exchange() {
    return new TopicExchange(properties.getAmqp().getExchange().getCommand());
  }

  @Bean
  Binding binding(Queue queue, TopicExchange exchange) {
    return BindingBuilder.bind(queue).to(exchange).with(properties.getAmqp().getQueue().getCommand());
  }

  @Bean
  Queue eventQueue() {
    return new Queue(properties.getAmqp().getQueue().getEvent(), true);
  }

  @Bean
  TopicExchange eventExchange() {
    return new TopicExchange(properties.getAmqp().getExchange().getEvent());
  }

  @Bean
  Binding eventBinding() {
    return BindingBuilder.bind(eventQueue())
      .to(eventExchange())
      .with(properties.getAmqp().getQueue().getEvent());
  }

  @Bean
  RabbitTemplate rabbitTemplate(final ConnectionFactory connectionFactory) {
    final RabbitTemplate rabbitTemplate = new RabbitTemplate(connectionFactory);
    rabbitTemplate.setMessageConverter(producerJackson2MessageConverter());
    return rabbitTemplate;
  }

  @Bean
  Jackson2JsonMessageConverter producerJackson2MessageConverter() {
    return new Jackson2JsonMessageConverter();
  }


}

@@ -145,164 +145,9 @@
 ore.
-Binding;%0Aimport org.springframework.amqp.core.BindingBuilder;%0Aimport org.springframework.amqp.core.Queue;%0Aimport org.springframework.amqp.core.TopicExchange
+*
 ;%0Aim
@@ -1361,37 +1361,32 @@
 %0A  %7D%0A%0A  @Bean%0A  
-Topic
 Exchange eventEx
@@ -1403,37 +1403,38 @@
 %0A    return new 
-Topic
+Fanout
 Exchange(propert
@@ -1602,50 +1602,20 @@
 ith(
-properties.getAmqp().getQueue().getEvent()
+%22*%22).noargs(
 );%0A 

Use fanout instead of topic for event exchange