create your session with (false, false, false)
this API is sort of internal... we do have some controls on flushes in ACKs. if you set auto-ack to false, it would flush the acks before you called commit. On Fri, Mar 26, 2021 at 6:05 AM <tobias.w...@t-systems.com> wrote: > > I'm using the following code to receive a message. > After a successful read I was expecting that the message is remove from the > queue?! > But the message was still in the queue. > How can I read a message and remove it? > > String result; > ClientSession session = this.sessionFactory.createSession(); > try { > session.start(); > ClientConsumer consumer = > session.createConsumer(ACTIVE_MQ_SMTP_QUEUE); > ClientMessage message = consumer.receive(); > result = message.getDataBuffer().readString(); > message.acknowledge(); > session.commit(); > } finally { > session.close(); > } -- Clebert Suconic