Aufenthaltstitel automatically expire in 6 months once you departure federal republic of Germany. It means, anybody who own German Aufenthaltstitel (Residence Permit) can stay abroad not more then 6 months. They have to come back to Germany before expiration of six months.
If its compulsory for you to stay abroad more than 6 months, then you have to take special permission from Ausländerbehörde before leaving the Germany. There are some special conditions that allows you to stay abroad more than 6 months. These special conditions are:
- If you are a student at German university and going abroad to study one or two semesters in a foreign university,
- If you a social worker,
- If you are a family member of a German diplomat,
- If you are employee of a company that have headquarter in Germany and you are going on special visit,
- If you are abroad to give benefit to federal republic of Germany
If you hold blue card. Then you can stay abroad maximum one year. If you have permanent residence permit. Then you can also stay abroad maximum 6 months and must fly back before expiration of 6 month duration. These rules are same also for family members of blue card and Aufenthaltstitel holders.
Summary: Aufenthaltstitel holder fly back to Germany before expiration of six months. Blue card holder flyback before expiration of 12 months. You can stay longer than 6 months if you have special permission from Ausländerbehörde.