Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How to receive message from queue based on JMSPriority

Avatar

Level 2

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.

8 Replies

Avatar

Employee Advisor

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

Avatar

Level 2

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.java: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(ServerSessionEndpoint.java:2103)

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

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

    at org.jboss.jms.server.endpoint.advised.SessionAdvised$createConsumerDelegate_8721389917985689973.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(SessionAdvised.java)

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

    at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.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$ClientSessionDelegate$createConsumerDelegate$aop(ClientSessionDelegate.java:267)

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

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

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

    at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect_z_handleCreateConsumerDelegate_930384804.invoke(StateCreationAspect_z_handleCreateConsumerDelegate_930384804.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_handleCreateConsumerDelegate_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.java: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(ClientSessionDelegate.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

Avatar

Level 2

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???

Avatar

Employee Advisor

Ok, last one, use "5"  .

Thanks,

Wasil

Avatar

Level 2

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.java: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(ServerSessionEndpoint.java:283)

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

    at org.jboss.jms.server.endpoint.advised.SessionAdvised$createConsumerDelegate_8721389917985689973.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(SessionAdvised.java)

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

    at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.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$ClientSessionDelegate$createConsumerDelegate$aop(ClientSessionDelegate.java:267)

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

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

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

    at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect_z_handleCreateConsumerDelegate_930384804.invoke(StateCreationAspect_z_handleCreateConsumerDelegate_930384804.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_handleCreateConsumerDelegate_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.java: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(ClientSessionDelegate.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

Avatar

Employee Advisor

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

Avatar

Level 2

HI Wasil,

thanks for reply and for trying at your end.

I will escalate it.

Thanks,

Ramu