Class JmsTemporaryQueueEndpoint

  • All Implemented Interfaces:
    AutoCloseable, org.apache.camel.AsyncEndpoint, org.apache.camel.CamelContextAware, DestinationEndpoint, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.MultipleConsumersSupport, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.BrowsableEndpoint, org.apache.camel.spi.HasId, org.apache.camel.spi.HeaderFilterStrategyAware, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

    public class JmsTemporaryQueueEndpoint
    extends JmsQueueEndpoint
    implements DestinationEndpoint
    A JMS Endpoint for working with a TemporaryQueue

    Important: Need to be really careful to always use the same Connection otherwise the destination goes stale

    • Constructor Detail

      • JmsTemporaryQueueEndpoint

        public JmsTemporaryQueueEndpoint​(String endpointUri,
                                         String destination)
      • JmsTemporaryQueueEndpoint

        public JmsTemporaryQueueEndpoint​(javax.jms.TemporaryQueue jmsDestination)
                                  throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException
    • Method Detail

      • isSingleton

        public boolean isSingleton()
        This endpoint is a singleton so that the temporary destination instances are shared across all producers and consumers of the same endpoint URI
        Specified by:
        isSingleton in interface org.apache.camel.IsSingleton
        Overrides:
        isSingleton in class org.apache.camel.support.DefaultEndpoint
        Returns:
        true
      • getJmsDestination

        public javax.jms.Destination getJmsDestination​(javax.jms.Session session)
                                                throws javax.jms.JMSException
        Specified by:
        getJmsDestination in interface DestinationEndpoint
        Throws:
        javax.jms.JMSException
      • createJmsDestination

        protected javax.jms.Destination createJmsDestination​(javax.jms.Session session)
                                                      throws javax.jms.JMSException
        Throws:
        javax.jms.JMSException