Class MessageCountProducerSessionFactory

  • All Implemented Interfaces:
    ComponentLifecycle, ProducerSessionFactory

    public class MessageCountProducerSessionFactory
    extends ProducerSessionFactoryImpl
    Implementation of ProducerSessionFactory that creates a new session/producer based the number of messages.

    This implementaton refreshes the session based on a count of the number of messages.

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

    • Constructor Detail

      • MessageCountProducerSessionFactory

        public MessageCountProducerSessionFactory()
      • MessageCountProducerSessionFactory

        public MessageCountProducerSessionFactory​(java.lang.Integer max)
    • Method Detail

      • getMaxMessages

        public java.lang.Integer getMaxMessages()
      • setMaxMessages

        public void setMaxMessages​(java.lang.Integer max)
        Set the maximum number of messages before a session refresh is required.
        Parameters:
        max - the max number of messages; if not specified, defaults to 1024.