Interface NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder

  • All Superinterfaces:
    org.apache.camel.builder.EndpointProducerBuilder, org.apache.camel.EndpointProducerResolver
    All Known Subinterfaces:
    NettyEndpointBuilderFactory.AdvancedNettyEndpointBuilder
    Enclosing interface:
    NettyEndpointBuilderFactory

    public static interface NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder
    extends org.apache.camel.builder.EndpointProducerBuilder
    Advanced builder for endpoint producers for the Netty component.
    • Method Detail

      • correlationManager

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder correlationManager​(Object correlationManager)
        To use a custom correlation manager to manage how request and reply messages are mapped when using request/reply with the netty producer. This should only be used if you have a way to map requests together with replies such as if there is correlation ids in both the request and reply messages. This can be used if you want to multiplex concurrent messages on the same channel (aka connection) in netty. When doing this you must have a way to correlate the request and reply messages so you can store the right reply on the inflight Camel Exchange before its continued routed. We recommend extending the TimeoutCorrelationManagerSupport when you build custom correlation managers. This provides support for timeout and other complexities you otherwise would need to implement as well. See also the producerPoolEnabled option for more details. The option is a: org.apache.camel.component.netty.NettyCamelStateCorrelationManager type. Group: producer (advanced)
      • correlationManager

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder correlationManager​(String correlationManager)
        To use a custom correlation manager to manage how request and reply messages are mapped when using request/reply with the netty producer. This should only be used if you have a way to map requests together with replies such as if there is correlation ids in both the request and reply messages. This can be used if you want to multiplex concurrent messages on the same channel (aka connection) in netty. When doing this you must have a way to correlate the request and reply messages so you can store the right reply on the inflight Camel Exchange before its continued routed. We recommend extending the TimeoutCorrelationManagerSupport when you build custom correlation managers. This provides support for timeout and other complexities you otherwise would need to implement as well. See also the producerPoolEnabled option for more details. The option will be converted to a org.apache.camel.component.netty.NettyCamelStateCorrelationManager type. Group: producer (advanced)
      • lazyChannelCreation

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder lazyChannelCreation​(boolean lazyChannelCreation)
        Channels can be lazily created to avoid exceptions, if the remote server is not up and running when the Camel producer is started. The option is a: boolean type. Default: true Group: producer (advanced)
      • lazyChannelCreation

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder lazyChannelCreation​(String lazyChannelCreation)
        Channels can be lazily created to avoid exceptions, if the remote server is not up and running when the Camel producer is started. The option will be converted to a boolean type. Default: true Group: producer (advanced)
      • producerPoolEnabled

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder producerPoolEnabled​(boolean producerPoolEnabled)
        Whether producer pool is enabled or not. Important: If you turn this off then a single shared connection is used for the producer, also if you are doing request/reply. That means there is a potential issue with interleaved responses if replies comes back out-of-order. Therefore you need to have a correlation id in both the request and reply messages so you can properly correlate the replies to the Camel callback that is responsible for continue processing the message in Camel. To do this you need to implement NettyCamelStateCorrelationManager as correlation manager and configure it via the correlationManager option. See also the correlationManager option for more details. The option is a: boolean type. Default: true Group: producer (advanced)
      • producerPoolEnabled

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder producerPoolEnabled​(String producerPoolEnabled)
        Whether producer pool is enabled or not. Important: If you turn this off then a single shared connection is used for the producer, also if you are doing request/reply. That means there is a potential issue with interleaved responses if replies comes back out-of-order. Therefore you need to have a correlation id in both the request and reply messages so you can properly correlate the replies to the Camel callback that is responsible for continue processing the message in Camel. To do this you need to implement NettyCamelStateCorrelationManager as correlation manager and configure it via the correlationManager option. See also the correlationManager option for more details. The option will be converted to a boolean type. Default: true Group: producer (advanced)
      • producerPoolMaxActive

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder producerPoolMaxActive​(int producerPoolMaxActive)
        Sets the cap on the number of objects that can be allocated by the pool (checked out to clients, or idle awaiting checkout) at a given time. Use a negative value for no limit. The option is a: int type. Default: -1 Group: producer (advanced)
      • producerPoolMaxActive

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder producerPoolMaxActive​(String producerPoolMaxActive)
        Sets the cap on the number of objects that can be allocated by the pool (checked out to clients, or idle awaiting checkout) at a given time. Use a negative value for no limit. The option will be converted to a int type. Default: -1 Group: producer (advanced)
      • producerPoolMinEvictableIdle

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder producerPoolMinEvictableIdle​(long producerPoolMinEvictableIdle)
        Sets the minimum amount of time (value in millis) an object may sit idle in the pool before it is eligible for eviction by the idle object evictor. The option is a: long type. Default: 300000 Group: producer (advanced)
      • producerPoolMinEvictableIdle

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder producerPoolMinEvictableIdle​(String producerPoolMinEvictableIdle)
        Sets the minimum amount of time (value in millis) an object may sit idle in the pool before it is eligible for eviction by the idle object evictor. The option will be converted to a long type. Default: 300000 Group: producer (advanced)
      • producerPoolMinIdle

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder producerPoolMinIdle​(int producerPoolMinIdle)
        Sets the minimum number of instances allowed in the producer pool before the evictor thread (if active) spawns new objects. The option is a: int type. Group: producer (advanced)
      • udpConnectionlessSending

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder udpConnectionlessSending​(boolean udpConnectionlessSending)
        This option supports connection less udp sending which is a real fire and forget. A connected udp send receive the PortUnreachableException if no one is listen on the receiving port. The option is a: boolean type. Default: false Group: producer (advanced)
      • udpConnectionlessSending

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder udpConnectionlessSending​(String udpConnectionlessSending)
        This option supports connection less udp sending which is a real fire and forget. A connected udp send receive the PortUnreachableException if no one is listen on the receiving port. The option will be converted to a boolean type. Default: false Group: producer (advanced)
      • allowSerializedHeaders

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder allowSerializedHeaders​(boolean allowSerializedHeaders)
        Only used for TCP when transferExchange is true. When set to true, serializable objects in headers and properties will be added to the exchange. Otherwise Camel will exclude any non-serializable objects and log it at WARN level. The option is a: boolean type. Default: false Group: advanced
      • allowSerializedHeaders

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder allowSerializedHeaders​(String allowSerializedHeaders)
        Only used for TCP when transferExchange is true. When set to true, serializable objects in headers and properties will be added to the exchange. Otherwise Camel will exclude any non-serializable objects and log it at WARN level. The option will be converted to a boolean type. Default: false Group: advanced
      • basicPropertyBinding

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder basicPropertyBinding​(boolean basicPropertyBinding)
        Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities. The option is a: boolean type. Default: false Group: advanced
      • basicPropertyBinding

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder basicPropertyBinding​(String basicPropertyBinding)
        Whether the endpoint should use basic property binding (Camel 2.x) or the newer property binding with additional capabilities. The option will be converted to a boolean type. Default: false Group: advanced
      • nativeTransport

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder nativeTransport​(boolean nativeTransport)
        Whether to use native transport instead of NIO. Native transport takes advantage of the host operating system and is only supported on some platforms. You need to add the netty JAR for the host operating system you are using. See more details at: http://netty.io/wiki/native-transports.html. The option is a: boolean type. Default: false Group: advanced
      • nativeTransport

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder nativeTransport​(String nativeTransport)
        Whether to use native transport instead of NIO. Native transport takes advantage of the host operating system and is only supported on some platforms. You need to add the netty JAR for the host operating system you are using. See more details at: http://netty.io/wiki/native-transports.html. The option will be converted to a boolean type. Default: false Group: advanced
      • options

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder options​(String key,
                                                                                         Object value)
        Allows to configure additional netty options using option. as prefix. For example option.child.keepAlive=false to set the netty option child.keepAlive=false. See the Netty documentation for possible options that can be used. The option is a: java.util.Map<java.lang.String, java.lang.Object> type. The option is multivalued, and you can use the options(String, Object) method to add a value (call the method multiple times to set more values). Group: advanced
      • options

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder options​(Map values)
        Allows to configure additional netty options using option. as prefix. For example option.child.keepAlive=false to set the netty option child.keepAlive=false. See the Netty documentation for possible options that can be used. The option is a: java.util.Map<java.lang.String, java.lang.Object> type. The option is multivalued, and you can use the options(String, Object) method to add a value (call the method multiple times to set more values). Group: advanced
      • transferExchange

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder transferExchange​(boolean transferExchange)
        Only used for TCP. You can transfer the exchange over the wire instead of just the body. The following fields are transferred: In body, Out body, fault body, In headers, Out headers, fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. The option is a: boolean type. Default: false Group: advanced
      • transferExchange

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder transferExchange​(String transferExchange)
        Only used for TCP. You can transfer the exchange over the wire instead of just the body. The following fields are transferred: In body, Out body, fault body, In headers, Out headers, fault headers, exchange properties, exchange exception. This requires that the objects are serializable. Camel will exclude any non-serializable objects and log it at WARN level. The option will be converted to a boolean type. Default: false Group: advanced
      • workerCount

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder workerCount​(int workerCount)
        When netty works on nio mode, it uses default workerCount parameter from Netty (which is cpu_core_threads x 2). User can use this option to override the default workerCount from Netty. The option is a: int type. Group: advanced
      • workerCount

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder workerCount​(String workerCount)
        When netty works on nio mode, it uses default workerCount parameter from Netty (which is cpu_core_threads x 2). User can use this option to override the default workerCount from Netty. The option will be converted to a int type. Group: advanced
      • workerGroup

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder workerGroup​(Object workerGroup)
        To use a explicit EventLoopGroup as the boss thread pool. For example to share a thread pool with multiple consumers or producers. By default each consumer or producer has their own worker pool with 2 x cpu count core threads. The option is a: io.netty.channel.EventLoopGroup type. Group: advanced
      • workerGroup

        default NettyEndpointBuilderFactory.AdvancedNettyEndpointProducerBuilder workerGroup​(String workerGroup)
        To use a explicit EventLoopGroup as the boss thread pool. For example to share a thread pool with multiple consumers or producers. By default each consumer or producer has their own worker pool with 2 x cpu count core threads. The option will be converted to a io.netty.channel.EventLoopGroup type. Group: advanced