public PUBLISH createPublish(ActiveMQMessage message) throws DataFormatException, IOException, JMSException {
PUBLISH publish = protocolConverter.convertMessage(message);
if (publish.qos().ordinal() > this.qos.ordinal()) {
publish.qos(this.qos);
}
switch (publish.qos()) {
case AT_LEAST_ONCE:
case EXACTLY_ONCE:
// set packet id, and optionally dup flag
protocolConverter.getPacketIdGenerator().setPacketId(protocolConverter.getClientId(), this, message, publish);
case AT_MOST_ONCE: