1

The Dynamic application composition topic says that

Properties can also be added, updated, or removed at runtime, and so can subscriptions. The compile-time properties and subscriptions just serve as initial settings.

but it doesn't say how to do that. So, how do you do that?

ndsilva
  • 309
  • 1
  • 8
Mark Rajcok
  • 362,217
  • 114
  • 495
  • 492

1 Answers1

1

In the operator that exports the stream, call

setOutputPortExportProperties({property1_name=value, property2_name=value, ...},
  portNumber);

In the operator that imports the stream, call

setInputPortImportSubscription(subscription_string, portNumber);

SPL sample project 042_dynamic_import_export_api_at_work provides an example.

Mark Rajcok
  • 362,217
  • 114
  • 495
  • 492
  • This post on Streamsdev discusses changing properties in depth:https://developer.ibm.com/streamsdev/docs/changing-connections-runtime-export-import/ – ndsilva Mar 14 '18 at 01:29