Annotation Type Blocking


  • @Retention(RUNTIME)
    @Target(METHOD)
    public @interface Blocking
    Identifies that a particular method performs blocking operations, and as such should be executed on separate worker. When supported, the caller execution context is captured and restored after the execution of the blocking method. This means that the rest of the pipeline would run in the same context (same thread). Typically this is the case if the caller is using a Vert.x Context (event loop or worker).
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      boolean ordered
      Indicates whether the execution on the worker pool should be ordered.
      String value
      Indicates the name of the worker pool to use for execution.
    • Field Detail

      • DEFAULT_WORKER_POOL

        static final String DEFAULT_WORKER_POOL
    • Element Detail

      • value

        String value
        Indicates the name of the worker pool to use for execution. By default all executions will be performed on the default worker pool. The maximum concurrency of a custom worker pool can be set with the following configuration key: smallrye.messaging.worker.{pool-name}.max-concurrency
        Returns:
        custom worker pool name for blocking execution.
        Default:
        "<no-value>"
      • ordered

        boolean ordered
        Indicates whether the execution on the worker pool should be ordered. By default all executions are ordered. The blocking processing of incoming messages is executed on workers. However, some computations may be faster than others. When ordered is set to true, the results are emitted in the same order as the input, preserving the ordering. When ordered is set to false, results are emitted as soon as the blocking computation has terminated, regardless of whether the computation of previous messages has completed.
        Returns:
        whether executions should be ordered.
        Default:
        true