quixio / quix-streams

Quix Streams - A library for data streaming and Python Stream Processing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Topic name property available in topic and stream objects

JotaBlanco opened this issue · comments

Is your feature request related to a problem? Please describe.
When creating a same callback to react to different topics, I'd like some times to have the topic name information within the callback function (for example, to create a TAG in the output informing about the input topic that is behind that specific message).

Describe the solution you'd like
I'd like to have access to the topic name property through the InputTopic, OutputTopic, StreamReader and StreamWriter objects. So, same as I can do input_stream.stream_id I'd also like that input_topic.topic_id and input_stream.topic_id were possible.

commented

We'll explore the option to improve the callbacks to provide more details such as this.

commented

After #39, in python the callbacks will have the following parameters:

  1. Input/Output topic
  2. Stream
  3. Other (such as Data, end type, etc)

In C# it is using Eventhandler signature, giving option to subscribe to event with (sender, args) => .... signature, where args has properties relevant for the event, such as Topic, Stream, Data.

I will see if I can add some details to the topic.

I didn't quite understand what you mean with the callback. Is the TopicConsumer/TopicProducer class going to have a topic_id method?

Closing ticket, for now this should be sorted in C# which moved to https://github.com/quixio/quix-streams-dotnet
For new python this isn't likely an issue