package io.quarkus.it.rabbitmq;

import javax.enterprise.context.ApplicationScoped;

import org.eclipse.microprofile.reactive.messaging.Outgoing;

import io.smallrye.mutiny.Multi;

@ApplicationScoped
public class PeopleProducer {
    @Outgoing("people-out")
    public Multi<Person> generatePeople() {
        return Multi.createFrom().items(
                new Person("bob"),
                new Person("alice"),
                new Person("tom"),
                new Person("jerry"),
                new Person("anna"),
                new Person("ken"));
    }
}

@@ -26,16 +26,44 @@
 bitmq;%0A%0A
+import java.time.Duration;%0A%0A
 import j
@@ -105,16 +105,16 @@
 Scoped;%0A
-
 %0Aimport 
@@ -200,16 +200,47 @@
 y.Multi;
+%0Aimport io.smallrye.mutiny.Uni;
 %0A%0A@Appli
@@ -369,20 +369,18 @@
  return 
-Mult
+Un
 i.create
@@ -390,14 +390,147 @@
 m().
-items(
+nullItem()%0A                .onItem().delayIt().by(Duration.ofSeconds(3))%0A                .onItem().transformToMulti(n -%3E Multi.createFrom()
 %0A   
@@ -534,32 +534,47 @@
                 
+        .items(
 new Person(%22bob%22
@@ -584,32 +584,48 @@
                 
+         
+       
 new Person(%22alic
@@ -637,32 +637,48 @@
                 
+       
+         
 new Person(%22tom%22
@@ -688,32 +688,48 @@
                 
+      
+          
 new Person(%22jerr
@@ -741,32 +741,48 @@
                 
+    
+            
 new Person(%22anna
@@ -793,32 +793,48 @@
                 
+   
+             
 new Person(%22ken%22
@@ -835,16 +835,17 @@
 (%22ken%22))
+)
 ;%0A    %7D%0A

Add delay to ensure queue is created and bound.