# File test/test_client.rb, line 163
  def test_transaction_ack_rollback_with_new_client
    @client.publish make_destination, message_text

    @client.begin 'tx1'
    message = nil
    sid = nil
    if @client.protocol() == Stomp::SPL_10
      @client.subscribe(make_destination, :ack => 'client') {|m| message = m}
    else
      sid = @client.uuid()
      @client.subscribe(make_destination, :ack => 'client', :id => sid) {|m| message = m}
    end
    sleep 0.01 until message
    assert_equal message_text, message.body
    assert_nothing_raised {
      if @client.protocol() == Stomp::SPL_10
        @client.acknowledge message, :transaction => 'tx1'
      else
        @client.acknowledge message, :transaction => 'tx1', :subscription => sid
      end
      message = nil
      @client.abort 'tx1'
    }
    checkEmsg(@client)
    # lets recreate the connection
    teardown
    setup
    sid = nil
    assert_nothing_raised {
      if @client.protocol() == Stomp::SPL_10
        @client.subscribe(make_destination, :ack => 'client') {|m| message = m}
      else
        sid = @client.uuid()
        @client.subscribe(make_destination, :ack => 'client', :id => sid) {|m| message = m}
      end
    }
    Timeout::timeout(4) do
      sleep 0.01 until message
    end
    assert_not_nil message
    assert_equal message_text, message.body
    assert_nothing_raised {
    @client.begin 'tx2'
      case @client.protocol()
        when Stomp::SPL_10
          @client.acknowledge message, :transaction => 'tx2'
        when Stomp::SPL_11
          @client.acknowledge message, :transaction => 'tx2', :subscription => sid
        else
          # Skip 1.2+ for now.  Current 1.2 broker appears to think this is 
          # already ACK'd.
      end
      @client.commit 'tx2'
    }
    checkEmsg(@client)
  end