Is it compulsory to marry? Is it compulsory to bear children? If you don't bear children are you sinning against God and Genesis 1:28?
"But I say to the unmarried and to widows that it is good for them if they remain even as I. ... I think then that this is good in view of the present distress, that it is good for a man to remain as he is. Are you bound to a wife? Do not seek to be released. Are you released from a wife? Do not seek a wife. But if you marry, you have not sinned; and if a virgin marries, she has not sinned. Yet such will have trouble in this life, and I am trying to spare you. But this I say, brethren, the time has been shortened, so that from now on those who have wives should be as though they had none" (I Corinthians 7:8, 26-29).
Jesus, Paul, and Barnabas were all unmarried (I Corinthians 9:5). They were not in sin because of this; in fact, Jesus was without sin.
"For there are eunuchs who were born that way from their mother's womb; and there are eunuchs who were made eunuchs by men; and there are also eunuchs who made themselves eunuchs for the sake of the kingdom of heaven. He who is able to accept this, let him accept it" (Matthew 19:12).
Eunuchs are men who are unable to have children. Some are born that way. Some are castrated by other men. And some choose not to have sex and children because of their devotion to God and His church. None of the men were in sin. In fact, one of the early converts to Christianity was a eunuch from Ethiopia (Acts 8:25-40).
Therefore, while God encourages marriage and the having of children, neither are required for salvation.