DEV Community

Cover image for Using Topic Views 6: Changing Topic Properties Of Reference Topics

Using Topic Views 6: Changing Topic Properties Of Reference Topics

Push Technology’s Diffusion Intelligent Event Data Platform makes it easy to consume, enrich, and deliver event data
・1 min read

Changing topic properties of reference topics
In the prior example, we used a topic view to adapt existing topics into more intuitively named topics. In this example we will change another characteristic of the source topics: the topic properties.

Using the Topics tab we can see that topics under Demos/Fx/raw are uncompressed: they carry the property COMPRESSION which is set to false, where the default is true. Consequently, any topic subscribers will receive uncompressed updates which may consume more bandwidth and affect overall performance.

Open the Topic Views tab.
Edit the topic view Demos/Fx currency pairs.
Change the specification to map ?Demos/Fx/raw/.* to Demos/Fx/ with properties "COMPRESSION":"true" – notice the quotes around the key and value you are setting.

Click Replace.
Open the Topics tab.
Browse to one of the named topics under Demos/Fx.
Open the Details tab and note that it lacks the COMPRESSION property that its source topic carries. Topics are compressed by default, so we would not expect to see the property COMPRESSION set to true.

Summary: The topic property mapping clause with properties can be used to set some (though not all) of the properties on the resulting reference topic.

That concludes this tutorial series on topic views.

To learn more about the full power of topic views, see the latest topic views documentation in the Diffusion manual.

For specifics of how to create topic views from your preferred Diffusion SDK, see the API documentation for the language you’re using.

Originally Published on:

Discussion (0)