Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I keep Cos Event Service consumers from blocking suppliers?

0
10 Posted

How do I keep Cos Event Service consumers from blocking suppliers?

0

By default, the COS event channel delivers an event to a consumer using the same thread that received it from the supplier. When suppliers publish or emit events, they do so using a two-way invocation. When the event channel delivers an event, it also uses a two-way invocation. Since these are both two-way calls, and the delivery invocation is initiated during the publishing invocation, this causes the supplier to block (waiting for the response to its two-way publication invocation) while the consumers process the event. This behavior can be avoided by directing the event channel to use a separate dispatching thread for the push to the consumers. This is accomplished differently depending on which COS EC is being used. When using the “native” COS EC, the -CECDispatching option can be used to change the dispatching strategy. A dispatching strategy of “mt” (multithreaded) will start a second thread and use it for the push calls to the consumer.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.