The problem you are talking about, is - AMF cannot send any response, when the server is down.
You just dont receive anything, because there is nobody answering your request.
If you need to be sure, you have to take care about this issue at the middle tier.
If you want to insert a unique record, you can use a unique key defined at the database. In case you try to insert the same value, you receive an error.
If you cannot handle it this way, you can use a flag in your query, that shows the receiving script, that this is a retry. Then try to read the database first, if you find this record, do not insert, if not, insert.