Interface SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder

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

    public static interface SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder
    extends org.apache.camel.builder.EndpointProducerBuilder
    Advanced builder for endpoint producers for the Simple JMS component.
    • Method Detail

      • allowNullBody

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder allowNullBody​(boolean allowNullBody)
        Whether to allow sending messages with no body. If this option is false and the message body is null, then an JMSException is thrown. The option is a: <code>boolean</code> type. Default: true Group: producer (advanced)
        Parameters:
        allowNullBody - the value to set
        Returns:
        the dsl builder
      • allowNullBody

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder allowNullBody​(String allowNullBody)
        Whether to allow sending messages with no body. If this option is false and the message body is null, then an JMSException is thrown. The option will be converted to a <code>boolean</code> type. Default: true Group: producer (advanced)
        Parameters:
        allowNullBody - the value to set
        Returns:
        the dsl builder
      • disableTimeToLive

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder disableTimeToLive​(boolean disableTimeToLive)
        Use this option to force disabling time to live. For example when you do request/reply over JMS, then Camel will by default use the requestTimeout value as time to live on the message being sent. The problem is that the sender and receiver systems have to have their clocks synchronized, so they are in sync. This is not always so easy to archive. So you can use disableTimeToLive=true to not set a time to live value on the sent message. Then the message will not expire on the receiver system. See below in section About time to live for more details. The option is a: <code>boolean</code> type. Default: false Group: producer (advanced)
        Parameters:
        disableTimeToLive - the value to set
        Returns:
        the dsl builder
      • disableTimeToLive

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder disableTimeToLive​(String disableTimeToLive)
        Use this option to force disabling time to live. For example when you do request/reply over JMS, then Camel will by default use the requestTimeout value as time to live on the message being sent. The problem is that the sender and receiver systems have to have their clocks synchronized, so they are in sync. This is not always so easy to archive. So you can use disableTimeToLive=true to not set a time to live value on the sent message. Then the message will not expire on the receiver system. See below in section About time to live for more details. The option will be converted to a <code>boolean</code> type. Default: false Group: producer (advanced)
        Parameters:
        disableTimeToLive - the value to set
        Returns:
        the dsl builder
      • explicitQosEnabled

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder explicitQosEnabled​(Boolean explicitQosEnabled)
        Set if the deliveryMode, priority or timeToLive qualities of service should be used when sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos option, which operates at message granularity, reading QoS properties exclusively from the Camel In message headers. The option is a: <code>java.lang.Boolean</code> type. Default: false Group: producer (advanced)
        Parameters:
        explicitQosEnabled - the value to set
        Returns:
        the dsl builder
      • explicitQosEnabled

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder explicitQosEnabled​(String explicitQosEnabled)
        Set if the deliveryMode, priority or timeToLive qualities of service should be used when sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos option, which operates at message granularity, reading QoS properties exclusively from the Camel In message headers. The option will be converted to a <code>java.lang.Boolean</code> type. Default: false Group: producer (advanced)
        Parameters:
        explicitQosEnabled - the value to set
        Returns:
        the dsl builder
      • lazyStartProducer

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder lazyStartProducer​(boolean lazyStartProducer)
        Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. The option is a: <code>boolean</code> type. Default: false Group: producer (advanced)
        Parameters:
        lazyStartProducer - the value to set
        Returns:
        the dsl builder
      • lazyStartProducer

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder lazyStartProducer​(String lazyStartProducer)
        Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing. The option will be converted to a <code>boolean</code> type. Default: false Group: producer (advanced)
        Parameters:
        lazyStartProducer - the value to set
        Returns:
        the dsl builder
      • preserveMessageQos

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder preserveMessageQos​(boolean preserveMessageQos)
        Set to true, if you want to send message using the QoS settings specified on the message, instead of the QoS settings on the JMS endpoint. The following three headers are considered JMSPriority, JMSDeliveryMode, and JMSExpiration. You can provide all or only some of them. If not provided, Camel will fall back to use the values from the endpoint instead. So, when using this option, the headers override the values from the endpoint. The explicitQosEnabled option, by contrast, will only use options set on the endpoint, and not values from the message header. The option is a: <code>boolean</code> type. Default: false Group: producer (advanced)
        Parameters:
        preserveMessageQos - the value to set
        Returns:
        the dsl builder
      • preserveMessageQos

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder preserveMessageQos​(String preserveMessageQos)
        Set to true, if you want to send message using the QoS settings specified on the message, instead of the QoS settings on the JMS endpoint. The following three headers are considered JMSPriority, JMSDeliveryMode, and JMSExpiration. You can provide all or only some of them. If not provided, Camel will fall back to use the values from the endpoint instead. So, when using this option, the headers override the values from the endpoint. The explicitQosEnabled option, by contrast, will only use options set on the endpoint, and not values from the message header. The option will be converted to a <code>boolean</code> type. Default: false Group: producer (advanced)
        Parameters:
        preserveMessageQos - the value to set
        Returns:
        the dsl builder
      • asyncStartListener

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder asyncStartListener​(boolean asyncStartListener)
        Whether to startup the consumer message listener asynchronously, when starting a route. For example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while retrying and/or failover. This will cause Camel to block while starting routes. By setting this option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker using a dedicated thread in asynchronous mode. If this option is used, then beware that if the connection could not be established, then an exception is logged at WARN level, and the consumer will not be able to receive messages; You can then restart the route to retry. The option is a: <code>boolean</code> type. Default: false Group: advanced
        Parameters:
        asyncStartListener - the value to set
        Returns:
        the dsl builder
      • asyncStartListener

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder asyncStartListener​(String asyncStartListener)
        Whether to startup the consumer message listener asynchronously, when starting a route. For example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while retrying and/or failover. This will cause Camel to block while starting routes. By setting this option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker using a dedicated thread in asynchronous mode. If this option is used, then beware that if the connection could not be established, then an exception is logged at WARN level, and the consumer will not be able to receive messages; You can then restart the route to retry. The option will be converted to a <code>boolean</code> type. Default: false Group: advanced
        Parameters:
        asyncStartListener - the value to set
        Returns:
        the dsl builder
      • asyncStopListener

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder asyncStopListener​(boolean asyncStopListener)
        Whether to stop the consumer message listener asynchronously, when stopping a route. The option is a: <code>boolean</code> type. Default: false Group: advanced
        Parameters:
        asyncStopListener - the value to set
        Returns:
        the dsl builder
      • asyncStopListener

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder asyncStopListener​(String asyncStopListener)
        Whether to stop the consumer message listener asynchronously, when stopping a route. The option will be converted to a <code>boolean</code> type. Default: false Group: advanced
        Parameters:
        asyncStopListener - the value to set
        Returns:
        the dsl builder
      • destinationCreationStrategy

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder destinationCreationStrategy​(org.apache.camel.component.sjms.jms.DestinationCreationStrategy destinationCreationStrategy)
        To use a custom DestinationCreationStrategy. The option is a: <code>org.apache.camel.component.sjms.jms.DestinationCreationStrategy</code> type. Group: advanced
        Parameters:
        destinationCreationStrategy - the value to set
        Returns:
        the dsl builder
      • destinationCreationStrategy

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder destinationCreationStrategy​(String destinationCreationStrategy)
        To use a custom DestinationCreationStrategy. The option will be converted to a <code>org.apache.camel.component.sjms.jms.DestinationCreationStrategy</code> type. Group: advanced
        Parameters:
        destinationCreationStrategy - the value to set
        Returns:
        the dsl builder
      • exceptionListener

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder exceptionListener​(javax.jms.ExceptionListener exceptionListener)
        Specifies the JMS Exception Listener that is to be notified of any underlying JMS exceptions. The option is a: <code>javax.jms.ExceptionListener</code> type. Group: advanced
        Parameters:
        exceptionListener - the value to set
        Returns:
        the dsl builder
      • exceptionListener

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder exceptionListener​(String exceptionListener)
        Specifies the JMS Exception Listener that is to be notified of any underlying JMS exceptions. The option will be converted to a <code>javax.jms.ExceptionListener</code> type. Group: advanced
        Parameters:
        exceptionListener - the value to set
        Returns:
        the dsl builder
      • headerFilterStrategy

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder headerFilterStrategy​(org.apache.camel.spi.HeaderFilterStrategy headerFilterStrategy)
        To use a custom HeaderFilterStrategy to filter header to and from Camel message. The option is a: <code>org.apache.camel.spi.HeaderFilterStrategy</code> type. Group: advanced
        Parameters:
        headerFilterStrategy - the value to set
        Returns:
        the dsl builder
      • headerFilterStrategy

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder headerFilterStrategy​(String headerFilterStrategy)
        To use a custom HeaderFilterStrategy to filter header to and from Camel message. The option will be converted to a <code>org.apache.camel.spi.HeaderFilterStrategy</code> type. Group: advanced
        Parameters:
        headerFilterStrategy - the value to set
        Returns:
        the dsl builder
      • includeAllJMSXProperties

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder includeAllJMSXProperties​(boolean includeAllJMSXProperties)
        Whether to include all JMSXxxx properties when mapping from JMS to Camel Message. Setting this to true will include properties such as JMSXAppID, and JMSXUserID etc. Note: If you are using a custom headerFilterStrategy then this option does not apply. The option is a: <code>boolean</code> type. Default: false Group: advanced
        Parameters:
        includeAllJMSXProperties - the value to set
        Returns:
        the dsl builder
      • includeAllJMSXProperties

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder includeAllJMSXProperties​(String includeAllJMSXProperties)
        Whether to include all JMSXxxx properties when mapping from JMS to Camel Message. Setting this to true will include properties such as JMSXAppID, and JMSXUserID etc. Note: If you are using a custom headerFilterStrategy then this option does not apply. The option will be converted to a <code>boolean</code> type. Default: false Group: advanced
        Parameters:
        includeAllJMSXProperties - the value to set
        Returns:
        the dsl builder
      • jmsKeyFormatStrategy

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder jmsKeyFormatStrategy​(org.apache.camel.component.sjms.jms.JmsKeyFormatStrategy jmsKeyFormatStrategy)
        Pluggable strategy for encoding and decoding JMS keys so they can be compliant with the JMS specification. Camel provides two implementations out of the box: default and passthrough. The default strategy will safely marshal dots and hyphens (. and -). The passthrough strategy leaves the key as is. Can be used for JMS brokers which do not care whether JMS header keys contain illegal characters. You can provide your own implementation of the org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it using the # notation. The option is a: <code>org.apache.camel.component.sjms.jms.JmsKeyFormatStrategy</code> type. Group: advanced
        Parameters:
        jmsKeyFormatStrategy - the value to set
        Returns:
        the dsl builder
      • jmsKeyFormatStrategy

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder jmsKeyFormatStrategy​(String jmsKeyFormatStrategy)
        Pluggable strategy for encoding and decoding JMS keys so they can be compliant with the JMS specification. Camel provides two implementations out of the box: default and passthrough. The default strategy will safely marshal dots and hyphens (. and -). The passthrough strategy leaves the key as is. Can be used for JMS brokers which do not care whether JMS header keys contain illegal characters. You can provide your own implementation of the org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it using the # notation. The option will be converted to a <code>org.apache.camel.component.sjms.jms.JmsKeyFormatStrategy</code> type. Group: advanced
        Parameters:
        jmsKeyFormatStrategy - the value to set
        Returns:
        the dsl builder
      • mapJmsMessage

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder mapJmsMessage​(boolean mapJmsMessage)
        Specifies whether Camel should auto map the received JMS message to a suited payload type, such as javax.jms.TextMessage to a String etc. See section about how mapping works below for more details. The option is a: <code>boolean</code> type. Default: true Group: advanced
        Parameters:
        mapJmsMessage - the value to set
        Returns:
        the dsl builder
      • mapJmsMessage

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder mapJmsMessage​(String mapJmsMessage)
        Specifies whether Camel should auto map the received JMS message to a suited payload type, such as javax.jms.TextMessage to a String etc. See section about how mapping works below for more details. The option will be converted to a <code>boolean</code> type. Default: true Group: advanced
        Parameters:
        mapJmsMessage - the value to set
        Returns:
        the dsl builder
      • messageCreatedStrategy

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder messageCreatedStrategy​(org.apache.camel.component.sjms.jms.MessageCreatedStrategy messageCreatedStrategy)
        To use the given MessageCreatedStrategy which are invoked when Camel creates new instances of javax.jms.Message objects when Camel is sending a JMS message. The option is a: <code>org.apache.camel.component.sjms.jms.MessageCreatedStrategy</code> type. Group: advanced
        Parameters:
        messageCreatedStrategy - the value to set
        Returns:
        the dsl builder
      • messageCreatedStrategy

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder messageCreatedStrategy​(String messageCreatedStrategy)
        To use the given MessageCreatedStrategy which are invoked when Camel creates new instances of javax.jms.Message objects when Camel is sending a JMS message. The option will be converted to a <code>org.apache.camel.component.sjms.jms.MessageCreatedStrategy</code> type. Group: advanced
        Parameters:
        messageCreatedStrategy - the value to set
        Returns:
        the dsl builder
      • recoveryInterval

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder recoveryInterval​(long recoveryInterval)
        Specifies the interval between recovery attempts, i.e. when a connection is being refreshed, in milliseconds. The default is 5000 ms, that is, 5 seconds. The option is a: <code>long</code> type. Default: 5000 Group: advanced
        Parameters:
        recoveryInterval - the value to set
        Returns:
        the dsl builder
      • recoveryInterval

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder recoveryInterval​(String recoveryInterval)
        Specifies the interval between recovery attempts, i.e. when a connection is being refreshed, in milliseconds. The default is 5000 ms, that is, 5 seconds. The option will be converted to a <code>long</code> type. Default: 5000 Group: advanced
        Parameters:
        recoveryInterval - the value to set
        Returns:
        the dsl builder
      • synchronous

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder synchronous​(boolean synchronous)
        Sets whether synchronous processing should be strictly used. The option is a: <code>boolean</code> type. Default: false Group: advanced
        Parameters:
        synchronous - the value to set
        Returns:
        the dsl builder
      • synchronous

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder synchronous​(String synchronous)
        Sets whether synchronous processing should be strictly used. The option will be converted to a <code>boolean</code> type. Default: false Group: advanced
        Parameters:
        synchronous - the value to set
        Returns:
        the dsl builder
      • transferException

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder transferException​(boolean transferException)
        If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this option takes precedence. The caught exception is required to be serializable. The original Exception on the consumer side can be wrapped in an outer exception such as org.apache.camel.RuntimeCamelException when returned to the producer. Use this with caution as the data is using Java Object serialization and requires the received to be able to deserialize the data at Class level, which forces a strong coupling between the producers and consumer!. The option is a: <code>boolean</code> type. Default: false Group: advanced
        Parameters:
        transferException - the value to set
        Returns:
        the dsl builder
      • transferException

        default SjmsEndpointBuilderFactory.AdvancedSjmsEndpointProducerBuilder transferException​(String transferException)
        If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the consumer side, then the caused Exception will be send back in response as a javax.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable robust routing. Notice that if you also have transferExchange enabled, this option takes precedence. The caught exception is required to be serializable. The original Exception on the consumer side can be wrapped in an outer exception such as org.apache.camel.RuntimeCamelException when returned to the producer. Use this with caution as the data is using Java Object serialization and requires the received to be able to deserialize the data at Class level, which forces a strong coupling between the producers and consumer!. The option will be converted to a <code>boolean</code> type. Default: false Group: advanced
        Parameters:
        transferException - the value to set
        Returns:
        the dsl builder