Subscriber Stream

Change which Reuters symbols the adapter subscribes to by passing subscription requests through a subscriber stream.

To specify which Reuters symbols the adapter subscribes to, create an input stream with the schema (all three columns are type String):


The subscriber stream does not need to be in the same project as the stream to which the Sybase CEP Reuters Consumer adapter is attached. However, each instance of the Sybase CEP Reuters adapter must use a different subscriber stream.

A row attempting to unsubscribe with an invalid symbol is ignored. A row subscribing to a symbol that is already subscribed to raises the priority of the subscription.

You can use one of the Sybase CEP SDKs to write a program to publish subscription requests to this subscriber stream. Depending on your application needs, you may be able to use one of the other input adapters to send the requests to this stream.

An example python script that publishes information to a subscriber stream is installed as c8_reuters_sub.py in the bin directory under the Sybase CEP Server installation directory. To use this example, copy it to the sdk/python directory under the installation directory and then run it from a command line. The script takes four arguments:


The script sends a row containing the last three arguments and publishes it to the stream identified with the first argument.

Example:
python "c8_reuters_sub.py"
   ccl://localhost:6666/Stream/Default/ReutersSubStream/SubStream 
   SUB IBM.N DIRECT_FEED