This sounds like your transaction has not committed yet.
When we started implementing celery message queuing we would run into this all the time. To fix it we wrote a special piece of logic so that the messages for the message queue would not get queued until the commit occurred. This had the added benefit of not sending the message to the queue if the transaction rolled back.