Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JMS support / bug when sending.... #509

Closed
RichardHightower opened this issue Oct 29, 2015 · 0 comments
Closed

JMS support / bug when sending.... #509

RichardHightower opened this issue Oct 29, 2015 · 0 comments

Comments

@RichardHightower
Copy link
Member

Detect connection is closed and recreate if needed

Caused by: javax.jms.IllegalStateException: The Session is closed
    at org.apache.activemq.ActiveMQSession.checkClosed(ActiveMQSession.java:752) ~[activemq-all-5.9.1.jar:5.9.1]
    at org.apache.activemq.ActiveMQSession.configureMessage(ActiveMQSession.java:740) ~[activemq-all-5.9.1.jar:5.9.1]
    at org.apache.activemq.ActiveMQSession.createTextMessage(ActiveMQSession.java:430) ~[activemq-all-5.9.1.jar:5.9.1]
    at io.advantageous.qbit.jms.JmsService.sendTextMessageWithDestination(JmsService.java:199) ~[qbit-jms-0.9.1-SNAPSHOT.jar:na]

One work around for this (at least with ActiveMQ) is to use the failover support.

            /** Use the failover support by default. */
            final JmsServiceBuilder jmsServiceBuilder = getJmsServiceBuilder()
                    .setProviderURLPattern("failover:tcp://#host#:#port#");

I made this the default.

http://activemq.apache.org/how-can-i-support-auto-reconnection.html

But we should check this as well and try to reconnect if it is down. Even if we don't use failover.

@RichardHightower RichardHightower changed the title JMS support JMS support / bug when sending.... Oct 29, 2015
builddaemonqbit added a commit that referenced this issue Nov 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant