Class MessageSizeProducerSessionFactory

  • All Implemented Interfaces:
    ComponentLifecycle, ProducerSessionFactory

    public class MessageSizeProducerSessionFactory
    extends ProducerSessionFactoryImpl
    Implementation of ProducerSessionFactory that creates a new session/producer based on message size.

    This implementaton refreshes the session based on the total size of the messages produced.

    In the adapter configuration file this class is aliased as jms-message-size-producer-session which is the preferred alternative to the fully qualified classname when building your configuration.

    • Constructor Detail

      • MessageSizeProducerSessionFactory

        public MessageSizeProducerSessionFactory()
      • MessageSizeProducerSessionFactory

        public MessageSizeProducerSessionFactory​(java.lang.Long max)
    • Method Detail

      • getMaxSizeBytes

        public java.lang.Long getMaxSizeBytes()
      • setMaxSizeBytes

        public void setMaxSizeBytes​(java.lang.Long max)
        Set the maximum accumulated size of messages before a session refresh is required.
        Parameters:
        max - the max size of messages; if not specified, defaults to 10 megabytes.