It seems that rabbitmq connection is not started before BootStrap as it throws an exemption:
java.lang.IllegalStateException: connection '879392ab-01d6-4b60-84b6-b8dabf156973' is not active
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrConstructorNewInstance(ReflectiveInterceptor.java:1076)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:84)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:238)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:250)
at com.budjb.rabbitmq.connection.ConnectionContextImpl.getConnection(ConnectionContextImpl.groovy:210)
at com.budjb.rabbitmq.connection.ConnectionContextImpl.createChannel(ConnectionContextImpl.groovy:182)
at com.budjb.rabbitmq.connection.ConnectionContext$createChannel.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
at com.budjb.rabbitmq.connection.ConnectionManagerImpl.createChannel(ConnectionManagerImpl.groovy:118)
at com.budjb.rabbitmq.publisher.RabbitMessagePublisherImpl.send(RabbitMessagePublisherImpl.groovy:71)
at com.budjb.rabbitmq.publisher.RabbitMessagePublisherImpl.send(RabbitMessagePublisherImpl.groovy:89)
We need this functionality as we hooked rabbitmq messages to domain class events like afterInsert(), afterUpdate(), etc. which are also called from BootStrap.
I've played a little bit with starting the connection manually in bootstrap but had no luck.
It seems that rabbitmq connection is not started before BootStrap as it throws an exemption:
We need this functionality as we hooked rabbitmq messages to domain class events like
afterInsert(),afterUpdate(), etc. which are also called from BootStrap.I've played a little bit with starting the connection manually in bootstrap but had no luck.