There are 2 possibilities here and both could have played a role-
First, the risk of endocarditis is increased in diabetes- Diabetes does lead to certain immunologic changes that predispose to certain infection See the below link.
On the other hand, brucellosis is a disease that is notoriously difficult to diagnose early, and can go on for weeks to months before being recognized. Any serious infection like endocarditis raises the "stress" hormones- like cortisol and adrenaline which in turn leads to insulin resistance and higher blood sugars. All doctors will tell you that we commonly see high blood sugars when someone has a serious infection, in both diabetics and non diabetics- So in other words the infection may have lead to your diabetes.
I hope that helps.
Always ask if you need clarification/more information.
If I have answered your question, please click the ACCEPT button so I can get my credit.POSITIVE feedback & a BONUS are warmly appreciated. Please note that answers are for information only, do not take the place of an assessment by your doctor,and does not establish a patient-physician relationship.