Skip to content

Blocking subscriber callback and message buffer size #860

Answered by KerstinKeller
chengguizi asked this question in Q&A
Discussion options

You must be logged in to vote

HI @chengguizi ,

eCAL will internally create one thread per subscriber topic (plus some extra, not 100% sure).
Your callbacks will be blocking, e.g. if you spend tooo much time in the callback and multiple messages arrive in the meantime, you will loose all but the most recent one. There is no internal eCAL queue.

However, callbacks for multiple topics may run concurrently, so you will have to synchronize mutliple callbacks yourself.

However, maybe in your usecase, using the synchronous "receive" function is a better fit. You can poll for data and also give a timeout (to see if you want to block or not).

Replies: 4 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by chengguizi
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants