Skip to content

Add subscription ID tracking in message publishing#1032

Closed
Josme wants to merge 12 commits intoRobotWebTools:ros2from
Josme:ros2
Closed

Add subscription ID tracking in message publishing#1032
Josme wants to merge 12 commits intoRobotWebTools:ros2from
Josme:ros2

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

@github-actions
Copy link

This PR has been marked as stale because there has been no activity in the past 6 months. Please add a comment to keep it open.

@github-actions github-actions bot added the stale label Dec 22, 2025
@github-actions github-actions bot closed this Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments