---
title: "There is already a delivery set for auto ack ：false"
author: "bawking"
date: "2011-07-19T14:53:52Z"
tags: []
categories: ["编程语言"]
slug: "there-is-already-a-delivery-set-for-auto-ack-false"
draft: false
lastmod: "2011-07-19T15:44:41Z"
id: 1127965
url: "https://bawking.iteye.com/blog/1127965"
---

JMS的消息session接受后设置值进去会报  There is already a delivery set for auto ack ：false。代码
session = connection.createQueueSession(<span style="color:red">false</span>, QueueSession.AUTO_ACKNOWLEDGE);

先改为
  session = connection.createQueueSession(<span style="color:red">true</span>, QueueSession.AUTO_ACKNOWLEDGE);试试，待会儿看结果

结果不行，暂时先换成2条消息发送