question

Upvotes
Accepted
3 2 4 10

Market Price pause for individual items

How can we pause individual market price requests, is there specific example for this. (I found example 350 for pause all open items.

elektronrefinitiv-realtimeelektron-sdkrrtema-apielektron-message-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvote
Accepted
11.3k 25 8 13

To send pause for an individual item, application needs to call reissue for item handle instead of login handle.

Please see the following example code. The code has been modified on the example 350 to send pause for <JPY=> RIC, once the application receives 10 updates for the RIC.

void AppClient::onUpdateMsg( const UpdateMsg& updateMsg, const OmmConsumerEvent& ommEvent )
{
	...
	// pause all items when 10th update is received
	if ( updateMsg.getDomainType() == MMT_MARKET_PRICE && updateMsg.getName()=="JPY=")
	{
		if ( ++_updateNumber == 10 )
		{
			cout << endl << "Pause item stream" << endl;
			//_pOmmConsumer->reissue( ReqMsg().domainType( MMT_LOGIN ).initialImage( false ).pause( true ).name( "user" ), _loginHandle );
			_pOmmConsumer->reissue( ReqMsg().domainType( MMT_MARKET_PRICE ).initialImage( false ).pause( true ).name( "JPY=" ), ommEvent.getHandle() );
		}
	}
}
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

@veerapath.rungruengrayubkul

Thanks for the reply it is really helpful.

Can we use same method to pause a single item subscribed through batch request.

If so can we use the batch request handle for that.

And how this is communicated to the provider, is it through a RequestMsg.

@thimalk

You cannot call reissue with a batch request handle to pause all items in the batch request. This is because the batch request stream will automatically be closed, once the request is successfully sent.

Currently, you can only call reissue with an item handle to pause an item. Please note that if application uses batch request, it can get an item handle for each item passed in the batch request via the getHandle() function called in the onRefreshMsg() call back.

Click below to post an Idea Post Idea