Re: UIMA-AS with ActiveMQ VM Transport
The vm is currently reserved for async aggregate AE (collocated) endpoints. Async aggregate AE communicates with its colocated delegate AE using java (non-jms) queues to avoid serialization/deserialization of CASes. The vm keyword in the endpoint is used to identify such collocated AEs. Don't remember why vm was chosen to represent these endpoints. This decision was made early in the development of UIMA-AS. Fixing that will require refactoring of the UIMA-AS aggregate code and possibly other components as well. Even if this is fixed, the UIMA-AS client still has to seriallize/deserialize CASes when messaging the service. Not sure if using the vm protocol would reduce the latency assuming this is the main reason for using the AMQ vm transport between the UIMA-AS client and the service. -jerry On Tue, Nov 3, 2020 at 3:11 PM Richard Eckart de Castilho wrote: > Hi Jerry, > > > On 3. Nov 2020, at 17:52, Jaroslaw Cwiklik wrote: > > > > My apologies for a late reply to your question. The UIMA-AS client does > not > > support vm protocol between clients and services. Only tcp and http are > > currently supported as you've noted. You can manage broker persistence > > settings in the broker configuration See > > http://activemq.apache.org/persistence ( > > ) > > is there a particular (technical) reason why the vm protocol is not > supported? > > Would a potential interested contributor be faced with significant trouble > in > trying to add support for it? > > Cheers, > > -- Richard
Re: UIMA-AS with ActiveMQ VM Transport
Hi Jerry, > On 3. Nov 2020, at 17:52, Jaroslaw Cwiklik wrote: > > My apologies for a late reply to your question. The UIMA-AS client does not > support vm protocol between clients and services. Only tcp and http are > currently supported as you've noted. You can manage broker persistence > settings in the broker configuration See > http://activemq.apache.org/persistence ( > ) is there a particular (technical) reason why the vm protocol is not supported? Would a potential interested contributor be faced with significant trouble in trying to add support for it? Cheers, -- Richard
Re: UIMA-AS with ActiveMQ VM Transport
My apologies for a late reply to your question. The UIMA-AS client does not support vm protocol between clients and services. Only tcp and http are currently supported as you've noted. You can manage broker persistence settings in the broker configuration See http://activemq.apache.org/persistence ( ) Jerry On Wed, Oct 14, 2020 at 12:55 PM kra...@t-online.de wrote: > Hi, > > I'm using UIMA-AS in a single JVM process, with having the activemq > broker, the uima-as client and the as deployment in the same java process. > UimaAsynchronousEngine.sendAndReceiveCAS() is used to send and wait for > the processed CAS. > This setups works with fine with brokerURL "tcp://localhost:61616". > > If I change the brokerURL to "vm://localhost?broker.persistent=false" I > get this NullPointerException on reply and after successful processing of > the CAS. > > java.lang.NullPointerException: null > at > org.apache.uima.aae.controller.AggregateAnalysisEngineController_impl.sendVMMessage(AggregateAnalysisEngineController_impl.java:2351) > ~[uimaj-as-core-2.10.3.jar!/:2.10.3] > at > org.apache.uima.aae.controller.AggregateAnalysisEngineController_impl.sendReplyToCollocatedClient(AggregateAnalysisEngineController_impl.java:2242) > ~[uimaj-as-core-2.10.3.jar!/:2.10.3] > > If I use "vm://localhost?marshal=false=false" as > brokerURL, there is a similar NPE before processing at > > java.lang.NullPointerException: null > at > org.apache.uima.aae.controller.BaseAnalysisEngineController.sendMetadata(BaseAnalysisEngineController.java:2952) > ~[uimaj-as-core-2.10.3.jar!/:2.10.3] > at > org.apache.uima.aae.controller.PrimitiveAnalysisEngineController_impl.sendMetadata(PrimitiveAnalysisEngineController_impl.java:1337) > ~[uimaj-as-core-2.10.3.jar!/:2.10.3] > at > org.apache.uima.aae.handler.input.MetadataRequestHandler_impl.handle(MetadataRequestHandler_impl.java:69) > ~[uimaj-as-core-2.10.3.jar!/:2.10.3] > at > org.apache.uima.adapter.jms.activemq.JmsInputChannel.onMessage(JmsInputChannel.java:745) > ~[uimaj-as-activemq-2.10.3.jar!/:2.10.3] > at > org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.doInvokeListener(UimaDefaultMessageListenerContainer.java:1180) > ~[uimaj-as-activemq-2.10.3.jar!/:2.10.3] > > Both are due to empty dispatchers in > org.apache.uima.aae.spi.transport.vm.VmTransport for the temp reply queue. > > Are these bugs and/or is there any way to avoid tcp/http brokerURL? > > Thank you very much, > John > >
UIMA-AS with ActiveMQ VM Transport
Hi, I'm using UIMA-AS in a single JVM process, with having the activemq broker, the uima-as client and the as deployment in the same java process. UimaAsynchronousEngine.sendAndReceiveCAS() is used to send and wait for the processed CAS. This setups works with fine with brokerURL "tcp://localhost:61616". If I change the brokerURL to "vm://localhost?broker.persistent=false" I get this NullPointerException on reply and after successful processing of the CAS. java.lang.NullPointerException: null at org.apache.uima.aae.controller.AggregateAnalysisEngineController_impl.sendVMMessage(AggregateAnalysisEngineController_impl.java:2351) ~[uimaj-as-core-2.10.3.jar!/:2.10.3] at org.apache.uima.aae.controller.AggregateAnalysisEngineController_impl.sendReplyToCollocatedClient(AggregateAnalysisEngineController_impl.java:2242) ~[uimaj-as-core-2.10.3.jar!/:2.10.3] If I use "vm://localhost?marshal=false=false" as brokerURL, there is a similar NPE before processing at java.lang.NullPointerException: null at org.apache.uima.aae.controller.BaseAnalysisEngineController.sendMetadata(BaseAnalysisEngineController.java:2952) ~[uimaj-as-core-2.10.3.jar!/:2.10.3] at org.apache.uima.aae.controller.PrimitiveAnalysisEngineController_impl.sendMetadata(PrimitiveAnalysisEngineController_impl.java:1337) ~[uimaj-as-core-2.10.3.jar!/:2.10.3] at org.apache.uima.aae.handler.input.MetadataRequestHandler_impl.handle(MetadataRequestHandler_impl.java:69) ~[uimaj-as-core-2.10.3.jar!/:2.10.3] at org.apache.uima.adapter.jms.activemq.JmsInputChannel.onMessage(JmsInputChannel.java:745) ~[uimaj-as-activemq-2.10.3.jar!/:2.10.3] at org.apache.uima.adapter.jms.activemq.UimaDefaultMessageListenerContainer.doInvokeListener(UimaDefaultMessageListenerContainer.java:1180) ~[uimaj-as-activemq-2.10.3.jar!/:2.10.3] Both are due to empty dispatchers in org.apache.uima.aae.spi.transport.vm.VmTransport for the temp reply queue. Are these bugs and/or is there any way to avoid tcp/http brokerURL? Thank you very much, John