Never mind... I found out why it was not working...
1. auparse_next_event() does not call callback function. I have to call that function when auparse_next_event() returns.
2. it expects events in string format. I configured the plugin to send events in binary format. hence auparse_next_event() was not returning..
3. auparse_next_event() returns only when the parser sees the beginning of the next event.. i.e first event is returned after seeing the beginning of the 2nd event. Is this expected?
--Satish