Closing a batch stream in EMA

LtDoolittle6
LtDoolittle6 Contributor

Looking in the EMA C++ documentation, I could not find any mention of closing a streaming batch of items. While I'm aware you can close a specific item, I could not find any guidelines around closing a batch, so I assumed it was similar to closing a single streaming item.

However, I was wrong.

When you perform a registerClient() on a consumer for a single item, you can use the returned handle to unregister that item, i.e.

UInt64 handle = ommConsumer.registerClient(<single item>);

...

ommConsumer.unregister(handle);

However, despite being intuitive, you can't do this with a batch. When you do, it will throw an exception that contains the error text:

"Invalid attempt to close batch stream. Instance name='Consumer_1_1"

The error message doesn't say you can't close a batch stream, but rather it was an invalid attempt. Fair enough. What is the valid way to do this? Can someone point me to where this is documented?

Best Answer

  • warat.boonyanit
    Answer ✓

    EMA does not support batch close yet.

    image

    So right now, you have to close single batch item one by one. You can get the handle of each batch items during onRefreshMsg callback.

Answers