8 Replies Latest reply on Sep 26, 2013 10:24 PM by Ramu Pasupuleti

    How to receive message from queue based on JMSPriority

    Ramu Pasupuleti

      Hi all,

       

      I want to receive message from Receive Message From Queue based on JMSPrirority.

       

      I am able to send message to queue using Send Message To Queue component with specifying Priority value as Five(Liternal value).

       

      Now, when I am trying to receive message from Queue by specifying JMSPriority='Five'; in Message selector, it is not working.

       

      But, when I use JMSPriority is not null in Message selector, I am able to receive message.

       

      How to receive message from queue by specifying exact value of JMSPriority.

       

      Please suggest.

        • 1. Re: How to receive message from queue based on JMSPriority
          WASIL Adobe Employee

          Can you try this in capital "FIVE". Also try this using LIKE operator.

          Here is one sample : http://help.adobe.com/en_US/livecycle/9.0/samples/StandardServicesJMS.html

           

          Thanks,

          Wasil

          • 2. Re: How to receive message from queue based on JMSPriority
            Ramu Pasupuleti Level 1

            Hi WASIL,

             

            I tried with captial FIVE and it is not working.

             

            I tried also like operator and the standard example doesn't recieve messages based on priority.

             

            I am experiecing below error:

             

             

            Caused by: javax.jms.InvalidSelectorException: The selector is invalid: JMSPriority LIKE '%FIVE%';

                at com.adobe.livecycle.jms.QueueMessageReceiver.receiveMessageFromQueueWithPropertiesNoWait( QueueMessageReceiver.java:206)

                at com.adobe.livecycle.jms.JMSService.receiveMessageFromQueue(JMSService.java:413)

                at sun.reflect.GeneratedMethodAccessor1017.invoke(Unknown Source)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at java.lang.reflect.Method.invoke(Method.java:616)

                at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:118)

                ... 135 more

            Caused by: javax.jms.InvalidSelectorException: The selector is invalid: JMSPriority LIKE '%FIVE%';

                at org.jboss.jms.server.selector.Selector.<init>(Selector.java:107)

                at org.jboss.jms.server.endpoint.ServerSessionEndpoint.createConsumerDelegateInternal(Server SessionEndpoint.java:2103)

                at org.jboss.jms.server.endpoint.ServerSessionEndpoint.createConsumerDelegate(ServerSessionE ndpoint.java:277)

                at org.jboss.jms.server.endpoint.advised.SessionAdvised.org$jboss$jms$server$endpoint$advise d$SessionAdvised$createConsumerDelegate$aop(SessionAdvised.java:94)

                at org.jboss.jms.server.endpoint.advised.SessionAdvised$createConsumerDelegate_8721389917985 689973.invokeTarget(SessionAdvised$createConsumerDelegate_8721389917985689973.java)

                at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)

                at org.jboss.jms.server.container.SecurityAspect.handleCreateConsumerDelegate(SecurityAspect .java:124)

                at sun.reflect.GeneratedMethodAccessor389.invoke(Unknown Source)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                at java.lang.reflect.Method.invoke(Method.java:616)

                at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:122)

                at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)

                at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                at org.jboss.jms.server.endpoint.advised.SessionAdvised.createConsumerDelegate(SessionAdvise d.java)

                at org.jboss.jms.wireformat.SessionCreateConsumerDelegateRequest.serverInvoke(SessionCreateC onsumerDelegateRequest.java:100)

                at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandle r.java:165)

                at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:967)

                at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:791 )

                at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:744)

                at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:586)

                at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)

                at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:216)

                at org.jboss.remoting.Client.invoke(Client.java:2034)

                at org.jboss.remoting.Client.invoke(Client.java:877)

                at org.jboss.remoting.Client.invoke(Client.java:865)

                at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:189)

                at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:160)

                at org.jboss.jms.client.delegate.ClientSessionDelegate.org$jboss$jms$client$delegate$ClientS essionDelegate$createConsumerDelegate$aop(ClientSessionDelegate.java:267)

                at org.jboss.jms.client.delegate.ClientSessionDelegate$createConsumerDelegate_87213899179856 89973.invokeTarget(ClientSessionDelegate$createConsumerDelegate_8721389917985689973.java)

                at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)

                at org.jboss.jms.client.container.StateCreationAspect.handleCreateConsumerDelegate(StateCrea tionAspect.java:136)

                at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect_z_handleCreateCon sumerDelegate_930384804.invoke(StateCreationAspect_z_handleCreateConsumerDelegate_93038480 4.java)

                at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                at org.jboss.jms.client.container.ConsumerAspect.handleCreateConsumerDelegate(ConsumerAspect .java:76)

                at org.jboss.aop.advice.org.jboss.jms.client.container.ConsumerAspect_z_handleCreateConsumer Delegate_930384804.invoke(ConsumerAspect_z_handleCreateConsumerDelegate_930384804.java)

                at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.j ava:92)

                at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)

                at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:172)

                at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)

                at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                at org.jboss.jms.client.delegate.ClientSessionDelegate.createConsumerDelegate(ClientSessionD elegate.java)

                at org.jboss.jms.client.JBossSession.createConsumer(JBossSession.java:237)

                at org.jboss.jms.client.JBossSession.createConsumer(JBossSession.java:220)

                at org.jboss.jms.client.JBossSession.createReceiver(JBossSession.java:396)

                at com.adobe.livecycle.jms.QueueMessageReceiver.receiveMessageFromQueueWithPropertiesNoWait( QueueMessageReceiver.java:198)

                ... 140 more

             

             

            Please suggest

            • 3. Re: How to receive message from queue based on JMSPriority
              WASIL Adobe Employee

              What if you use integer 5 ?

              • 4. Re: How to receive message from queue based on JMSPriority
                Ramu Pasupuleti Level 1

                Hi Wasil,

                 

                thanks for quick reply.

                 

                Even I try with 5,  I am not able to receive message.

                 

                It is showing like---"No message received".

                 

                 

                Is there any way to get the message and know that messages priority after/just before receving???

                • 5. Re: How to receive message from queue based on JMSPriority
                  WASIL Adobe Employee

                  Ok, last one, use "5"  .

                   

                  Thanks,

                  Wasil

                  • 6. Re: How to receive message from queue based on JMSPriority
                    Ramu Pasupuleti Level 1

                    Wasil,

                     

                    It is also not working.

                     

                    Occurred below error..

                     

                    Caused by: org.jboss.jms.exception.MessagingJMSException: A failure has occurred during processing of the request. Please consult the server logs for more details. SessionEndpoint[505-hvqq32mh-1-pcu3y1mh-xy69rv-a28462a] createConsumerDelegate [705-kvqq32mh-1-pcu3y1mh-xy69rv-a28462a]

                        at com.adobe.livecycle.jms.QueueMessageReceiver.receiveMessageFromQueueWithPropertiesNoWait( QueueMessageReceiver.java:206)

                        at com.adobe.livecycle.jms.JMSService.receiveMessageFromQueue(JMSService.java:413)

                        at sun.reflect.GeneratedMethodAccessor1017.invoke(Unknown Source)

                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                        at java.lang.reflect.Method.invoke(Method.java:616)

                        at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:118)

                        ... 135 more

                    Caused by: org.jboss.jms.exception.MessagingJMSException: A failure has occurred during processing of the request. Please consult the server logs for more details. SessionEndpoint[505-hvqq32mh-1-pcu3y1mh-xy69rv-a28462a] createConsumerDelegate [705-kvqq32mh-1-pcu3y1mh-xy69rv-a28462a]

                        at org.jboss.messaging.util.ExceptionUtil.handleJMSInvocation(ExceptionUtil.java:72)

                        at org.jboss.jms.server.endpoint.ServerSessionEndpoint.createConsumerDelegate(ServerSessionE ndpoint.java:283)

                        at org.jboss.jms.server.endpoint.advised.SessionAdvised.org$jboss$jms$server$endpoint$advise d$SessionAdvised$createConsumerDelegate$aop(SessionAdvised.java:94)

                        at org.jboss.jms.server.endpoint.advised.SessionAdvised$createConsumerDelegate_8721389917985 689973.invokeTarget(SessionAdvised$createConsumerDelegate_8721389917985689973.java)

                        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)

                        at org.jboss.jms.server.container.SecurityAspect.handleCreateConsumerDelegate(SecurityAspect .java:124)

                        at sun.reflect.GeneratedMethodAccessor389.invoke(Unknown Source)

                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                        at java.lang.reflect.Method.invoke(Method.java:616)

                        at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:122)

                        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)

                        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        at org.jboss.jms.server.endpoint.advised.SessionAdvised.createConsumerDelegate(SessionAdvise d.java)

                        at org.jboss.jms.wireformat.SessionCreateConsumerDelegateRequest.serverInvoke(SessionCreateC onsumerDelegateRequest.java:100)

                        at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandle r.java:165)

                        at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:967)

                        at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:791 )

                        at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:744)

                        at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:586)

                        at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)

                        at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:216)

                        at org.jboss.remoting.Client.invoke(Client.java:2034)

                        at org.jboss.remoting.Client.invoke(Client.java:877)

                        at org.jboss.remoting.Client.invoke(Client.java:865)

                        at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:189)

                        at org.jboss.jms.client.delegate.DelegateSupport.doInvoke(DelegateSupport.java:160)

                        at org.jboss.jms.client.delegate.ClientSessionDelegate.org$jboss$jms$client$delegate$ClientS essionDelegate$createConsumerDelegate$aop(ClientSessionDelegate.java:267)

                        at org.jboss.jms.client.delegate.ClientSessionDelegate$createConsumerDelegate_87213899179856 89973.invokeTarget(ClientSessionDelegate$createConsumerDelegate_8721389917985689973.java)

                        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)

                        at org.jboss.jms.client.container.StateCreationAspect.handleCreateConsumerDelegate(StateCrea tionAspect.java:136)

                        at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect_z_handleCreateCon sumerDelegate_930384804.invoke(StateCreationAspect_z_handleCreateConsumerDelegate_93038480 4.java)

                        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        at org.jboss.jms.client.container.ConsumerAspect.handleCreateConsumerDelegate(ConsumerAspect .java:76)

                        at org.jboss.aop.advice.org.jboss.jms.client.container.ConsumerAspect_z_handleCreateConsumer Delegate_930384804.invoke(ConsumerAspect_z_handleCreateConsumerDelegate_930384804.java)

                        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.j ava:92)

                        at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)

                        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:172)

                        at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)

                        at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

                        at org.jboss.jms.client.delegate.ClientSessionDelegate.createConsumerDelegate(ClientSessionD elegate.java)

                        at org.jboss.jms.client.JBossSession.createConsumer(JBossSession.java:237)

                        at org.jboss.jms.client.JBossSession.createConsumer(JBossSession.java:220)

                        at org.jboss.jms.client.JBossSession.createReceiver(JBossSession.java:396)

                        at com.adobe.livecycle.jms.QueueMessageReceiver.receiveMessageFromQueueWithPropertiesNoWait( QueueMessageReceiver.java:198)

                        ... 140 more

                    • 7. Re: How to receive message from queue based on JMSPriority
                      WASIL Adobe Employee

                      This is most likely a bug.I'm able to replicate this.Please get in touch with Enterprise Support to take this further.

                       

                      Thanks,

                      Wasil

                      • 8. Re: How to receive message from queue based on JMSPriority
                        Ramu Pasupuleti Level 1

                        HI Wasil,

                         

                        thanks for reply and for trying at your end.

                         

                        I will escalate it.

                         

                         

                        Thanks,

                        Ramu