[jboss-user] [EJB/JBoss] - JBoss/ActiveMQ Messages never delivered to MDB

rchristy do-not-reply at jboss.com
Mon Apr 6 12:31:00 EDT 2009

I have a very simple MDB (I am using JBoss 4.2.2 and ActiveMQ 5.,1 and 5.2 both have same behavior) that just consumes messages and throws them away.  I can easily reproduce a scenario where I load 100 messages on the queue, 1 to 3 messages will never be delivered to the my MDB.  If I stop/start the MDB, they get delivered fine.  I tried moving to ActiveMQ 5.2 (I originally was 5.1) and I see the exact behavior.  I can also reproduce the same issue but stopping the MDB, loading the messages on the queue, then starting the MDB.  Again, messages that never get delivered.

Is there something wrong with this example?

@MessageDriven(activationConfig =
      @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
      @ActivationConfigProperty(propertyName="destination", propertyValue="mylilmdb.test.queue"),
      @ActivationConfigProperty(propertyName="maximumRedeliveries", propertyValue="0"),
      @ActivationConfigProperty(propertyName="acknowledgeMode", propertyValue="Auto-acknowledge")
@PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=1)
public class MyLilMDB implements MessageListener {

    static Logger logger = Logger.getLogger(MyLilMDB.class);
    private MessageDrivenContext mdc;

    public void onMessage(Message message) {
        try {
            TextMessage msg = (TextMessage)message;
            String xml = msg.getText();   
           logger.info("Chopped Message:" + xml.substring(0, 100));
        catch (Exception e) {

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4223746#4223746

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4223746

More information about the jboss-user mailing list