Skip to content

Feature/client event handling#81

Draft
Rishygunjal wants to merge 2 commits intoCRED-CLUB:mainfrom
Rishygunjal:feature/client-event-handling
Draft

Feature/client event handling#81
Rishygunjal wants to merge 2 commits intoCRED-CLUB:mainfrom
Rishygunjal:feature/client-event-handling

Conversation

@Rishygunjal
Copy link

@Rishygunjal Rishygunjal commented Aug 18, 2025

Channel Event Enhancements

@Abhishekvrshny I have made changes so that I can send channel events both to other clients as well as to backend services.


1. Client → Backend

  • When a client sends a channel event, the backend must be subscribed to the specific topic mentioned in the channel_event payload.
  • Once subscribed, the backend can immediately start listening to events on that topic.
  • I have also created a sample backend.go file that demonstrates how this can be used.

Sample channel_event payload

{
  "channel_event": {
    "event": {
      "data": {
        "type_url": "minim irure ullamco dolore",
        "value": "Ns6="
      },
      "format_type": "TYPE_JSON_UNSPECIFIED",
      "name": "anim ea"
    },
    "topic": "qui aute", //Topic name should be mentioned here
    "unique_id": "reprehenderit"
  }
}

2. Client → Client

  • I have added functionality that automatically forwards channel events to other clients.
  • Similar to the backend case, the receiving client must have subscribed to the topic mentioned in the channel_event payload.
  • For now, inter-client communication works only on a topic-based model.
  • In the future, we can extend this to support other routing options such as:
    • client device IDs,
    • multiple topic subscriptions,
    • or hybrid approaches (topic + device ID).

💡 Idea Credit

This idea was discussed and worked on by me and @jaig10 . Together we explored how event handling can be extended in Propeller, and this draft PR represents our joint contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant