Skip to content

Conversation

Josme
Copy link

@Josme Josme commented May 16, 2025

Description :
This PR implements subscription ID propagation in message publishing to enable better client-side message tracking. The main changes include:

  1. Added subscription ID (sid) injection for all message formats:
for sid in subscription.clients:
    outgoing_msg = {"op": "publish", 
    "topic": topic, "id": sid}
  1. Enhanced compression format handling with ID preservation:
# For PNG compression
outgoing_msg = {"op": "png", "data": 
encode_png(...), "id": sid}

# For CBOR formats
outgoing_msg["id"] = sid
  1. Implemented per-client message generation logic:
subscription = self._subscriptions.get
(topic)
if subscription:
    for sid in subscription.clients:
        # Message construction per client

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