0

I'm using JMS to send messages between a producer and multiple consumers. I already have the producer that send messages to a queue and now I want to implement multiple consumers that will receive the message according their JMSXGroupID parameter.

I want to implement those consumers using an EJB (not MDBs), that will launch a Consumer for each Queue Message.

But I'm having difficulties in found information about how to implement Message Consumers using EJBs and how to launch them (probably using Threads).

Can you give some lights about that, or tell me where can I find good information?

user2144555
  • 1,315
  • 11
  • 34
  • 55
  • 1
    avoid using threads inside EJBs. Why not MDBs? – Leo Jul 23 '14 at 17:44
  • I've already implemented with MDBs. But after some hours working, new messages in the queue are not all being consumed... So I'm trying another implementation to find out if the same happens. – user2144555 Jul 24 '14 at 07:54
  • this is not supposed to happen. What EJB container and JMS implementation are you using? – Leo Jul 24 '14 at 12:29
  • Well, I'm using a QueueSender that sends messages to an HornetQueue (a LastValueQueue, more specifically). MDBs are processing those messages according the JMSXGroupID. I'm using EJB 3.0, HornetQ 2.2.14.Final, Jboss 5.1.0GA – user2144555 Jul 24 '14 at 15:35

0 Answers0