Interface NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder

  • All Superinterfaces:
    org.apache.camel.builder.EndpointConsumerBuilder, org.apache.camel.EndpointConsumerResolver
    All Known Subinterfaces:
    NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointBuilder
    Enclosing interface:
    NettyHttpEndpointBuilderFactory

    public static interface NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder
    extends org.apache.camel.builder.EndpointConsumerBuilder
    Advanced builder for endpoint consumers for the Netty HTTP component.
    • Method Detail

      • backlog

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder backlog​(int backlog)
        Allows to configure a backlog for netty consumer (server). Note the backlog is just a best effort depending on the OS. Setting this option to a value such as 200, 500 or 1000, tells the TCP stack how long the accept queue can be If this option is not configured, then the backlog depends on OS setting. The option is a: int type. Group: consumer (advanced)
      • backlog

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder backlog​(String backlog)
        Allows to configure a backlog for netty consumer (server). Note the backlog is just a best effort depending on the OS. Setting this option to a value such as 200, 500 or 1000, tells the TCP stack how long the accept queue can be If this option is not configured, then the backlog depends on OS setting. The option will be converted to a int type. Group: consumer (advanced)
      • exceptionHandler

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder exceptionHandler​(org.apache.camel.spi.ExceptionHandler exceptionHandler)
        To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. The option is a: org.apache.camel.spi.ExceptionHandler type. Group: consumer (advanced)
      • exceptionHandler

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder exceptionHandler​(String exceptionHandler)
        To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored. The option will be converted to a org.apache.camel.spi.ExceptionHandler type. Group: consumer (advanced)
      • mapHeaders

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder mapHeaders​(boolean mapHeaders)
        If this option is enabled, then during binding from Netty to Camel Message then the headers will be mapped as well (eg added as header to the Camel Message as well). You can turn off this option to disable this. The headers can still be accessed from the org.apache.camel.component.netty.http.NettyHttpMessage message with the method getHttpRequest() that returns the Netty HTTP request io.netty.handler.codec.http.HttpRequest instance. The option is a: boolean type. Default: true Group: consumer (advanced)
      • mapHeaders

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder mapHeaders​(String mapHeaders)
        If this option is enabled, then during binding from Netty to Camel Message then the headers will be mapped as well (eg added as header to the Camel Message as well). You can turn off this option to disable this. The headers can still be accessed from the org.apache.camel.component.netty.http.NettyHttpMessage message with the method getHttpRequest() that returns the Netty HTTP request io.netty.handler.codec.http.HttpRequest instance. The option will be converted to a boolean type. Default: true Group: consumer (advanced)
      • maxHeaderSize

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder maxHeaderSize​(int maxHeaderSize)
        The maximum length of all headers. If the sum of the length of each header exceeds this value, a io.netty.handler.codec.TooLongFrameException will be raised. The option is a: int type. Default: 8192 Group: consumer (advanced)
      • noReplyLogLevel

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder noReplyLogLevel​(org.apache.camel.LoggingLevel noReplyLogLevel)
        If sync is enabled this option dictates NettyConsumer which logging level to use when logging a there is no reply to send back. The option is a: org.apache.camel.LoggingLevel type. Default: WARN Group: consumer (advanced)
      • serverClosedChannelExceptionCaughtLogLevel

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder serverClosedChannelExceptionCaughtLogLevel​(org.apache.camel.LoggingLevel serverClosedChannelExceptionCaughtLogLevel)
        If the server (NettyConsumer) catches an java.nio.channels.ClosedChannelException then its logged using this logging level. This is used to avoid logging the closed channel exceptions, as clients can disconnect abruptly and then cause a flood of closed exceptions in the Netty server. The option is a: org.apache.camel.LoggingLevel type. Default: DEBUG Group: consumer (advanced)
      • serverClosedChannelExceptionCaughtLogLevel

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder serverClosedChannelExceptionCaughtLogLevel​(String serverClosedChannelExceptionCaughtLogLevel)
        If the server (NettyConsumer) catches an java.nio.channels.ClosedChannelException then its logged using this logging level. This is used to avoid logging the closed channel exceptions, as clients can disconnect abruptly and then cause a flood of closed exceptions in the Netty server. The option will be converted to a org.apache.camel.LoggingLevel type. Default: DEBUG Group: consumer (advanced)
      • serverExceptionCaughtLogLevel

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder serverExceptionCaughtLogLevel​(org.apache.camel.LoggingLevel serverExceptionCaughtLogLevel)
        If the server (NettyConsumer) catches an exception then its logged using this logging level. The option is a: org.apache.camel.LoggingLevel type. Default: WARN Group: consumer (advanced)
      • serverExceptionCaughtLogLevel

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder serverExceptionCaughtLogLevel​(String serverExceptionCaughtLogLevel)
        If the server (NettyConsumer) catches an exception then its logged using this logging level. The option will be converted to a org.apache.camel.LoggingLevel type. Default: WARN Group: consumer (advanced)
      • urlDecodeHeaders

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder urlDecodeHeaders​(boolean urlDecodeHeaders)
        If this option is enabled, then during binding from Netty to Camel Message then the header values will be URL decoded (eg %20 will be a space character. Notice this option is used by the default org.apache.camel.component.netty.http.NettyHttpBinding and therefore if you implement a custom org.apache.camel.component.netty.http.NettyHttpBinding then you would need to decode the headers accordingly to this option. The option is a: boolean type. Default: false Group: consumer (advanced)
      • urlDecodeHeaders

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder urlDecodeHeaders​(String urlDecodeHeaders)
        If this option is enabled, then during binding from Netty to Camel Message then the header values will be URL decoded (eg %20 will be a space character. Notice this option is used by the default org.apache.camel.component.netty.http.NettyHttpBinding and therefore if you implement a custom org.apache.camel.component.netty.http.NettyHttpBinding then you would need to decode the headers accordingly to this option. The option will be converted to a boolean type. Default: false Group: consumer (advanced)
      • allowSerializedHeaders

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder 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 NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder 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
      • disableStreamCache

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder disableStreamCache​(boolean disableStreamCache)
        Determines whether or not the raw input stream from Netty HttpRequest#getContent() or HttpResponset#getContent() is cached or not (Camel will read the stream into a in light-weight memory based Stream caching) cache. By default Camel will cache the Netty input stream to support reading it multiple times to ensure it Camel can retrieve all data from the stream. However you can set this option to true when you for example need to access the raw stream, such as streaming it directly to a file or other persistent store. Mind that if you enable this option, then you cannot read the Netty stream multiple times out of the box, and you would need manually to reset the reader index on the Netty raw stream. Also Netty will auto-close the Netty stream when the Netty HTTP server/HTTP client is done processing, which means that if the asynchronous routing engine is in use then any asynchronous thread that may continue routing the org.apache.camel.Exchange may not be able to read the Netty stream, because Netty has closed it. The option is a: boolean type. Default: false Group: advanced
      • disableStreamCache

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder disableStreamCache​(String disableStreamCache)
        Determines whether or not the raw input stream from Netty HttpRequest#getContent() or HttpResponset#getContent() is cached or not (Camel will read the stream into a in light-weight memory based Stream caching) cache. By default Camel will cache the Netty input stream to support reading it multiple times to ensure it Camel can retrieve all data from the stream. However you can set this option to true when you for example need to access the raw stream, such as streaming it directly to a file or other persistent store. Mind that if you enable this option, then you cannot read the Netty stream multiple times out of the box, and you would need manually to reset the reader index on the Netty raw stream. Also Netty will auto-close the Netty stream when the Netty HTTP server/HTTP client is done processing, which means that if the asynchronous routing engine is in use then any asynchronous thread that may continue routing the org.apache.camel.Exchange may not be able to read the Netty stream, because Netty has closed it. The option will be converted to a boolean type. Default: false Group: advanced
      • nativeTransport

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder 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 NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder 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 NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder 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 NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder 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
      • transferException

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder transferException​(boolean transferException)
        If enabled and an Exchange failed processing on the consumer side, and if the caused Exception was send back serialized in the response as a application/x-java-serialized-object content type. On the producer side the exception will be deserialized and thrown as is, instead of the HttpOperationFailedException. The caused exception is required to be serialized. This is by default turned off. If you enable this then be aware that Java will deserialize the incoming data from the request to Java and that can be a potential security risk. The option is a: boolean type. Default: false Group: advanced
      • transferException

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder transferException​(String transferException)
        If enabled and an Exchange failed processing on the consumer side, and if the caused Exception was send back serialized in the response as a application/x-java-serialized-object content type. On the producer side the exception will be deserialized and thrown as is, instead of the HttpOperationFailedException. The caused exception is required to be serialized. This is by default turned off. If you enable this then be aware that Java will deserialize the incoming data from the request to Java and that can be a potential security risk. The option will be converted to a boolean type. Default: false Group: advanced
      • transferExchange

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder 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 NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder 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
      • workerGroup

        default NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder 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 NettyHttpEndpointBuilderFactory.AdvancedNettyHttpEndpointConsumerBuilder 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