1 Reply Latest reply on May 11, 2015 10:13 AM by jbertram

    Failed to start JMS consumers with PAGE address-full-policy

    lauradp

      Hello,

      I'm changing my address full policy JMS configuration from BLOCK to PAGE:

       

        <address-setting match="#">

        <dead-letter-address>jms.queue.DLQ</dead-letter-address>

        <expiry-address>jms.queue.ExpiryQueue</expiry-address>

        <redelivery-delay>500</redelivery-delay>

        <max-delivery-attempts>-1</max-delivery-attempts>

        <max-size-bytes>10485760</max-size-bytes>

        <page-size-bytes>10485760</page-size-bytes>

        <address-full-policy>PAGE</address-full-policy>

        <message-counter-history-day-limit>10</message-counter-history-day-limit>

        </address-setting>

       

       

      When initing my JMS consumer whith the following code:

       

       

        private void setUpJmsSession() throws JMSException {

        trace.debug("setUpJmsSession START");

        HashMap<String, Object> params = new HashMap<String, Object>();

        TransportConfiguration transportConfiguration = new TransportConfiguration(NettyConnectorFactory.class.getName(), params);

        HornetQConnectionFactory cf = HornetQJMSClient.createConnectionFactoryWithoutHA(JMSFactoryType.QUEUE_CF, transportConfiguration);

        cf.setConsumerWindowSize(0);

        jmsConnnection = cf.createConnection();

        // Create a JMS Session

        jmsSession = jmsConnnection.createSession(true, Session.SESSION_TRANSACTED);

        trace.debug("Created Transacted session :" + jmsSession.getTransacted());

        trace.warn(jmsSession.toString());

        // jmsSession.getTransacted();

        trace.debug("setUpJmsSession END");

        }

       

       

      I get this error:

       

       

      09:43:05,862 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/NalHutta]] (MSC service thread 1-1) Servlet /NalHutta threw load() exception: HornetQException[errorCode=2 message=Cannot connect to server(s). Tried with all available servers.]

              at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:769) [hornetq-core-2.2.13.Final.jar:]

              at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:601) [hornetq-jms-2.2.13.Final.jar:]

              at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:119) [hornetq-jms-2.2.13.Final.jar:]

              at org.hornetq.jms.client.HornetQConnectionFactory.createConnection(HornetQConnectionFactory.java:114) [hornetq-jms-2.2.13.Final.jar:]