Forwarding message with unknown type

4 posts / 0 new
Last post
Offline
Joined: 01/23/2019
Posts: 4
Forwarding message with unknown type

Typically, a publisher & subscriber know the type they are processing.

In my use case, I would like to:

  • Listen on a topic A, not knowing the type of the topic.
  • Resend any information received on topic A on a different topic B.
  • By preference, I'd like to patch the content of the message.
    E.g. suppose that I would know the base type of the messages on topic A. By knowing the messages' base type I could go and modify some base-information in the message content, leaving the specialized fields alone. Unfortunately, as far as I know, in case I listen for a base type, I will only receive the data in the base type and not the specialised information. 

I know it is not the common DDS reasoning, but is there any way of reaching this?

Thanks,

Johan

ken
ken's picture
Offline
Joined: 04/13/2011
Posts: 46

Hi Johan,

   RTI actually has a service to do exactly what you're trying to do...the Routing Service. If you cannot use that service, however, you should look into the use of DynamicData. That is a generic API for data types (which is used by Routing and other services).

Thanks,
Ken

Offline
Joined: 02/11/2016
Posts: 142

Hey,

Just to clarify:

are you trying to:

1. have multiple types being sent on the same topic, A, and patched before they are sent on another topic, B

or

2. Have a single type (but one that you have only partial knowledge about) being sent on topic A, patched, and resent on topic B

 

Ken's answer would work well with the 2nd scenario but for the 1st scenario you may need to rethink what you're doing.

 

Hope this helps,

Roy.

Offline
Joined: 01/23/2019
Posts: 4

Hi Ken & KickR,

My case is closer to (2), so I guess dynamic data is something to look into.

As you could have observed, this question was linked with https://community.rti.com/forum-topic/efficient-data-agreement and the case is expanded further there.

Thanks already for this quick feedback!

Johan