title: Webflux Controller 'return Object instead of Mono'
body: <p>Hello I am new to Webflux I follow a tutorial for building reactive microservices. In my project I faced the following problem.</p>
  <p>I want to create a crud api for the product service and the following is the Create method</p>
  <pre><code>@Override
  public Product createProduct(Product product) {
  
      Optional&lt;ProductEntity&gt; productEntity = Optional.ofNullable(repository.findByProductId(product.getProductId()).block());
               productEntity.ifPresent((prod -&gt; {
                    throw new InvalidInputException(&quot;Duplicate key, Product Id: &quot; + product.getProductId());
                }));
  
      ProductEntity entity = mapper.apiToEntity(product);
      Mono&lt;Product&gt; newProduct = repository.save(entity)
          .log()
          .map(mapper::entityToApi);
  
      return newProduct.block();
  }
  </code></pre>
  <p>The problem is that when I call this method from postman I get the error
  <strong>&quot;block()/blockFirst()/blockLast() are blocking, which is not supported in thread reactor-http-nio-3&quot;</strong> but when I use a StreamListener this call works ok. The stream Listener gets events from a rabbit-mq channel</p>
  <p>StreamListener</p>
  <pre><code>@EnableBinding(Sink.class)
  public class MessageProcessor {
  
      private final ProductService productService;
  
      public MessageProcessor(ProductService productService) {
          this.productService = productService;
      }
  
      @StreamListener(target = Sink.INPUT)
      public void process(Event&lt;Integer, Product&gt; event) {
  
         
          switch (event.getEventType()) {
  
              case CREATE:
                  Product product = event.getData();
                  LOG.info(&quot;Create product with ID: {}&quot;, product.getProductId());
                  productService.createProduct(product);
                  break;
  
     
              default:
                  String errorMessage = &quot;Incorrect event type: &quot; + event.getEventType() + &quot;, expected a CREATE or DELETE event&quot;;
                  LOG.warn(errorMessage);
                  throw new EventProcessingException(errorMessage);
          }
      }
  }
  </code></pre>
  <p>I Have two questions.</p>
  <ol>
  <li>Why this works with The StreamListener and not with a simple request?</li>
  <li>Is there a proper way in webflux to return the object of the Mono or we always have to return a Mono?</li>
  </ol>