Hi,

I am writing a new internal output module, using batching and transactions.
When I tested my module, I got some problems regarding to how doAction()
and endTransaction() works.

I used a global data structure to track all the messages coming to
doAction() in one batch. Then process them inside EndTransaction, and reset
the counter.

My batch size is 20. However, in stress test, I found that doAction may
have 21 messages before endTransaction() consumed the batch and reset the
counter. I used pthread mutex in doAction() and EndTransaction() to make
sure the counter modification are protected by lock.

Q:
1) why doAction() takes more than  batchsize of messages() ? is this by
design?
2) How can this be handled gracefully?



The following are my action parameters

*.* action( type="omazuremds" template="fmt"
    queue.workerthreads="8"
    queue.dequeuebatchsize="20"
    queue.type="linkedList"
)
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to