1
votes

we have to application servers, both reading from the same JMS server, preferably from the same destination. We want to make sure that every message put into this destination is read by exactly two listeners - our idea was a Topic with exactly two durable subscribers.

We are using JBoss 5.1.0. How can I:

1) write a *-service.xml so that I can be sure that this message is read by two (no less no more) subscribers before it's deleted from destination

2) write a MDB using EJB3.0 specs (with annotations and stuff) that'll connect to the topic as one of the two durable subscribers?

I know that I can create a subscriber and then subscribe to a topic but that doesn't assures me that the messages put into topic before subscription will be delivered to me. Can you help?

1

1 Answers

1
votes

While I can't help you with writing code (im a c# guy) I have had a similar requirement. I ended up bridging from the topic to 2 queues and the receivers both consumed from their individual queue rather than the topic.