2

Pretty new to messaging/JMS on JBoss; need some help.

I am noticing different behaviour for Queue based messaging for a sample queue on JBOSS 4.2.3 and JBOSS 6.

Lets say there is a sample jms queue called "SampleQueue" and consumers consuming messages from it. In a working environment with Jboss 4.2.3 when i add messages to the SampleQueue; the consumers seem to be picking them up instantly.

However the same is not achieved in JBOSS 6.1. What i notice in JBOSS 6.1 is a consumer blocks till it receives acknowledgment or finishes processing for the previous message posted on the queue.

For example:-

If message M1 and M2 are pushed to the queue; in that order; M2 is not picked up by a consumer till "onMessage" call for M1 returns. In other words M2 is not picked up till M1 is processed and an acknowledgment sent.

How can i avoid this?

Its a non transacted; non durable queue we are talking about here. And a producer producing multiple messages with more than one consumer.

What i have tried so far:-

  1. Sending an explicit ack using the acknowledge method.
  2. setting "block-on-non-durable-send" to false in the hornetq-jms.xml.

My MDB config looks as below:-

@MessageDriven(activationConfig = {

        @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
        @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
        @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/SampleQueue"),
        @ActivationConfigProperty(propertyName = "messageSelector", propertyValue = "MessageFormat = 'Version 0.1' AND Service = 'SampleImpl'"

        ) })

        @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
 

I have also tried with maxSessions mdb property and setting explictly a strict pool of size 10 but to no avail.

Let me know of any other details that i need to add. Help greatly appreciated.

M..
  • 880
  • 7
  • 15
  • Can you please share you MDB config? be it XML or annotations – Patton Nov 17 '14 at 10:14
  • hmmm did you try creating multiple consumers? see this answer http://stackoverflow.com/a/7012685 – Patton Nov 18 '14 at 05:04
  • @Patton ..yes. I have tried that option as well; but it did not help. :-( – M.. Nov 18 '14 at 05:49
  • Can you please cross check if multiple instances are created and used? – Patton Nov 18 '14 at 06:03
  • @Patton where do i check that? – M.. Nov 18 '14 at 06:14
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/65117/discussion-between-abhin-and-patton). – M.. Nov 18 '14 at 06:24
  • @Patton I verified where we can change the pool size..and the place i was changing was the right place. You can find it here https://thenewcircle.com/static/bookshelf/jboss_admin_tutorial/ejb.html . So the problem still remains. – M.. Nov 18 '14 at 07:55

0 Answers0